|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.iris.dmc.seedcodec.Steim2
public class Steim2
Class for decoding or encoding Steim2-compressed data blocks to or from an array of integer values.
Steim compression scheme Copyrighted by Dr. Joseph Steim.
Constructor Summary | |
---|---|
Steim2()
|
Method Summary | |
---|---|
static int[] |
decode(byte[] b,
int numSamples,
boolean swapBytes)
Abbreviated, zero-bias version of decode(). |
static int[] |
decode(byte[] b,
int numSamples,
boolean swapBytes,
int bias)
Decode the indicated number of samples from the provided byte array and return an integer array of the decompressed values. |
static byte[] |
encode(int[] samples)
|
protected static int[] |
extractSamples(byte[] bytes,
int offset,
boolean swapBytes)
Extracts differences from the next 64 byte frame of the given compressed byte array (starting at offset) and returns those differences in an int array. |
static void |
main(java.lang.String[] args)
Static method for testing the decode() method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Steim2()
Method Detail |
---|
public static int[] decode(byte[] b, int numSamples, boolean swapBytes, int bias) throws SteimException
b
- input byte array to be decodednumSamples
- the number of samples that can be decoded from array
bswapBytes
- if true, swap reverse the endian-ness of the elements of
byte array b.bias
- the first difference value will be computed from this value.
If set to 0, the method will attempt to use the X(0) constant instead.
SteimException
- - encoded data length is not multiple of 64
bytes.public static int[] decode(byte[] b, int numSamples, boolean swapBytes) throws SteimException
SteimException
Steim2.decode(byte[],int,boolean,int)
public static byte[] encode(int[] samples)
protected static int[] extractSamples(byte[] bytes, int offset, boolean swapBytes)
bytes
- byte array of compressed data differencesoffset
- index to begin reading compressed bytes for decodingswapBytes
- reverse the endian-ness of the compressed bytes being read
public static void main(java.lang.String[] args) throws SteimException
args
- not used
SteimException
- from called method(s)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |