Class RANS4x8Encode
java.lang.Object
htsjdk.samtools.cram.compression.rans.RANSEncode<RANS4x8Params>
htsjdk.samtools.cram.compression.rans.RANS4x8Encode
Encoder for the CRAM 3.0 rANS 4x8 codec. Supports Order-0 and Order-1 encoding
with 4-way interleaved rANS states. Encoding proceeds backwards through the input
to produce a stream that can be decoded forwards.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]compress(byte[] input, RANS4x8Params params) Compress a byte array using the rANS 4x8 codec.Methods inherited from class RANSEncode
buildSymsOrder0, buildSymsOrder1, getEncodingSymbols
-
Constructor Details
-
RANS4x8Encode
public RANS4x8Encode()
-
-
Method Details
-
compress
Compress a byte array using the rANS 4x8 codec. Inputs shorter thanMINIMUM_ORDER_1_SIZEare always compressed with Order-0 regardless of the requested order.- Specified by:
compressin classRANSEncode<RANS4x8Params>- Parameters:
input- the data to compressparams- encoding parameters specifying Order-0 or Order-1- Returns:
- the compressed byte stream including header, frequency table, and encoded data
-