|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.pixelmed.scpecg.HuffmanDecoder
public class HuffmanDecoder
A class to implement Huffman decoding as used by the SCP-ECG standard.
DefaultHuffmanTable,
HuffmanTable| Constructor Summary | |
|---|---|
HuffmanDecoder(byte[] bytesToDecompress,
int differenceDataUsed,
int multiplier,
int numberOfHuffmanTables,
ArrayList huffmanTablesList)
Construct a Huffman decoder for the supplied encoded data, as read from an SCP-ECG file. |
|
| Method Summary | |
|---|---|
short |
decode()
Decode a single value. |
short[] |
decode(int nValuesWanted)
Decode a specified number of values. |
static void |
main(String[] arg)
For testing. |
String |
toString()
Dump the current decoder state as a String. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public HuffmanDecoder(byte[] bytesToDecompress,
int differenceDataUsed,
int multiplier,
int numberOfHuffmanTables,
ArrayList huffmanTablesList)
Construct a Huffman decoder for the supplied encoded data, as read from an SCP-ECG file.
bytesToDecompress - the compressed datadifferenceDataUsed - 0 = no, 1 = 1 difference value, 2 = 2 difference valuesmultiplier - a value by which to scale the decoded valuesnumberOfHuffmanTables - how many tables are available for usehuffmanTablesList - the Huffman tables themselves| Method Detail |
|---|
public final short decode()
throws Exception
Decode a single value.
Exception
public final short[] decode(int nValuesWanted)
throws Exception
Decode a specified number of values.
nValuesWanted - the number of decoded values wanted
Exceptionpublic String toString()
Dump the current decoder state as a String.
toString in class ObjectStringpublic static void main(String[] arg)
For testing.
Decodes the byte stream in the example specified in the SCP-ECG standard.
arg - none
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||