Package com.pixelmed.scpecg
Class HuffmanTable
java.lang.Object
com.pixelmed.scpecg.HuffmanTable
- Direct Known Subclasses:
DefaultHuffmanTable
A class to store Huffman Tables, either as read from an SCP-ECG file or the default as specified in the SCP-ECG standard.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected long[]protected int[]protected int[]protected int[]protected intprotected int[] -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHuffmanTable(int numberOfCodeStructuresInTable, int[] numberOfBitsInPrefix, int[] numberOfBitsInEntireCode, int[] tableModeSwitch, int[] baseValueRepresentedByBaseCode, long[] baseCode) Construct a Huffman Table from the supplied data as read from an SCP-ECG file. -
Method Summary
Modifier and TypeMethodDescriptionlong[]int[]int[]int[]intint[]toString()Dump the tables as aString.
-
Field Details
-
numberOfCodeStructuresInTable
protected int numberOfCodeStructuresInTable -
numberOfBitsInPrefix
protected int[] numberOfBitsInPrefix -
numberOfBitsInEntireCode
protected int[] numberOfBitsInEntireCode -
tableModeSwitch
protected int[] tableModeSwitch -
baseValueRepresentedByBaseCode
protected int[] baseValueRepresentedByBaseCode -
baseCode
protected long[] baseCode
-
-
Constructor Details
-
HuffmanTable
protected HuffmanTable() -
HuffmanTable
public HuffmanTable(int numberOfCodeStructuresInTable, int[] numberOfBitsInPrefix, int[] numberOfBitsInEntireCode, int[] tableModeSwitch, int[] baseValueRepresentedByBaseCode, long[] baseCode) Construct a Huffman Table from the supplied data as read from an SCP-ECG file.
- Parameters:
numberOfCodeStructuresInTable- the number of codes (i.e. the size of all the array parameters)numberOfBitsInPrefix- for each code, the number of prefix bits for each code (i.e. the Huffman code)numberOfBitsInEntireCode- for each code, if > numberOfBitsInPrefix, used to find the number of original bits encodedtableModeSwitch- for each code, a flag to indicate to switch to another table (1 indicates no switch)baseValueRepresentedByBaseCode- for each code, the value that the code representsbaseCode- the codes (with the order of bits reversed)
-
-
Method Details
-
getNumberOfCodeStructuresInTable
public int getNumberOfCodeStructuresInTable() -
getNumberOfBitsInPrefix
public int[] getNumberOfBitsInPrefix() -
getNumberOfBitsInEntireCode
public int[] getNumberOfBitsInEntireCode() -
getTableModeSwitch
public int[] getTableModeSwitch() -
getBaseValueRepresentedByBaseCode
public int[] getBaseValueRepresentedByBaseCode() -
getBaseCode
public long[] getBaseCode() -
toString
Dump the tables as a
String.
-