Class RANS4x8Encode

java.lang.Object
htsjdk.samtools.cram.compression.rans.RANSEncode<RANS4x8Params>
htsjdk.samtools.cram.compression.rans.RANS4x8Encode

public class RANS4x8Encode extends RANSEncode<RANS4x8Params>
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 Details

    • RANS4x8Encode

      public RANS4x8Encode()
  • Method Details

    • compress

      public byte[] compress(byte[] input, RANS4x8Params params)
      Compress a byte array using the rANS 4x8 codec. Inputs shorter than MINIMUM_ORDER_1_SIZE are always compressed with Order-0 regardless of the requested order.
      Specified by:
      compress in class RANSEncode<RANS4x8Params>
      Parameters:
      input - the data to compress
      params - encoding parameters specifying Order-0 or Order-1
      Returns:
      the compressed byte stream including header, frequency table, and encoded data