Class CanonicalHuffmanIntegerEncoding
- java.lang.Object
-
- htsjdk.samtools.cram.encoding.CRAMEncoding<Integer>
-
- htsjdk.samtools.cram.encoding.core.CanonicalHuffmanIntegerEncoding
-
public final class CanonicalHuffmanIntegerEncoding extends CRAMEncoding<Integer>
CRAMEncoding class for Huffman integer values.
-
-
Constructor Summary
Constructors Constructor Description CanonicalHuffmanIntegerEncoding(int[] symbols, int[] bitLengths)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CRAMCodec<Integer>buildCodec(SliceBlocksReadStreams sliceBlocksReadStreams, SliceBlocksWriteStreams sliceBlocksWriteStreams)Instantiate the codec represented by this encoding by supplying it with the appropriate streamsbooleanequals(Object o)static CanonicalHuffmanIntegerEncodingfromSerializedEncodingParams(byte[] serializedParams)Create a new instance of this encoding using the (ITF8 encoded) serializedParams.inthashCode()byte[]toSerializedEncodingParams()Serialize encoding parameters to an ITF8-encoded byte array.StringtoString()-
Methods inherited from class htsjdk.samtools.cram.encoding.CRAMEncoding
buildReadCodec, buildWriteCodec, id, toEncodingDescriptor
-
-
-
-
Method Detail
-
fromSerializedEncodingParams
public static CanonicalHuffmanIntegerEncoding fromSerializedEncodingParams(byte[] serializedParams)
Create a new instance of this encoding using the (ITF8 encoded) serializedParams.- Parameters:
serializedParams-- Returns:
- CanonicalHuffmanIntegerEncoding with parameters populated from serializedParams
-
toSerializedEncodingParams
public byte[] toSerializedEncodingParams()
Description copied from class:CRAMEncodingSerialize encoding parameters to an ITF8-encoded byte array. By convention, each subclass should have a corresponding and symmetric "fromSerializedEncodingParams" that returns a new instance of that encoding populated with values from the serialized encoding params.- Specified by:
toSerializedEncodingParamsin classCRAMEncoding<Integer>- Returns:
- a byte array containing the encoding's parameter values encoded as an ITF8 stream.
-
buildCodec
public CRAMCodec<Integer> buildCodec(SliceBlocksReadStreams sliceBlocksReadStreams, SliceBlocksWriteStreams sliceBlocksWriteStreams)
Description copied from class:CRAMEncodingInstantiate the codec represented by this encoding by supplying it with the appropriate streams- Specified by:
buildCodecin classCRAMEncoding<Integer>- Parameters:
sliceBlocksReadStreams- the core block bit stream aCoreCodecwill read fromsliceBlocksWriteStreams- the core block bit stream aCoreCodecwill write to- Returns:
- a newly instantiated codec
-
-