public class Codec extends java.lang.Object implements B1000Types
Constructor and Description |
---|
Codec() |
Modifier and Type | Method and Description |
---|---|
DecompressedData |
decompress(int type,
byte[] b,
int numSamples,
boolean swapBytes)
Decompresses the data into the best java primitive type for the given
compression and returns it.
|
byte[] |
encodeAsBytes(double[] data)
encodes the float data as a byte array.
|
byte[] |
encodeAsBytes(float[] data)
encodes the float data as a byte array.
|
byte[] |
encodeAsBytes(int[] data)
encodes the integer data as a byte array.
|
byte[] |
encodeAsBytes(short[] data)
encodes the short data as a byte array.
|
int |
getDecompressedType(int type)
returns an integer that represent the java primitive that the data will
decompresses to.
|
boolean |
isDecompressable(int type) |
public boolean isDecompressable(int type)
public DecompressedData decompress(int type, byte[] b, int numSamples, boolean swapBytes) throws CodecException, UnsupportedCompressionType
public int getDecompressedType(int type) throws UnsupportedCompressionType
UnsupportedCompressionType
public byte[] encodeAsBytes(short[] data)
public byte[] encodeAsBytes(int[] data)
public byte[] encodeAsBytes(float[] data)
public byte[] encodeAsBytes(double[] data)