Class RANSNx16Encode
java.lang.Object
htsjdk.samtools.cram.compression.rans.RANSEncode<RANSNx16Params>
htsjdk.samtools.cram.compression.rans.RANSNx16Encode
Encoder for the CRAM 3.1 rANSNx16 codec. Internal encoding uses byte[] with backwards-write
to eliminate the O(N) reverse pass. Pack/RLE/Stripe preprocessing still bridges through ByteBuffer
where CompressionUtils methods require it.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]compress(byte[] input, RANSNx16Params ransNx16Params) Compress a byte array using the rANS Nx16 codec.Methods inherited from class RANSEncode
buildSymsOrder0, buildSymsOrder1, getEncodingSymbols
-
Constructor Details
-
RANSNx16Encode
public RANSNx16Encode()
-
-
Method Details
-
compress
Compress a byte array using the rANS Nx16 codec. Applies the transformations specified by the params (PACK, RLE, STRIPE) as preprocessing, then encodes the result with Order-0 or Order-1 rANS using 4-way or 32-way interleaving.- Specified by:
compressin classRANSEncode<RANSNx16Params>- Parameters:
input- the data to compressransNx16Params- encoding parameters specifying order, interleave width, and transformations- Returns:
- the compressed byte stream
-