Class RANSNx16Params

java.lang.Object
htsjdk.samtools.cram.compression.rans.RANSNx16Params
All Implemented Interfaces:
RANSParams

public final class RANSNx16Params extends Object implements RANSParams
Parameters for the rANS Nx16 codec. The format flags byte encodes the combination of transformations (ORDER, N32, STRIPE, NOSZ, CAT, RLE, PACK) to apply.
  • Field Details

  • Constructor Details

    • RANSNx16Params

      public RANSNx16Params(int formatFlags)
      Parameters:
      formatFlags - the raw format flags byte from the compressed stream header
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getOrder

      public RANSParams.ORDER getOrder()
      Specified by:
      getOrder in interface RANSParams
    • getFormatFlags

      public int getFormatFlags()
      Specified by:
      getFormatFlags in interface RANSParams
    • getNumInterleavedRANSStates

      public int getNumInterleavedRANSStates()
      Returns:
      the number of interleaved rANS states: 4 (default) or 32 (if N32 flag set).
    • isStripe

      public boolean isStripe()
      Returns:
      true if the STRIPE transformation flag is set.
    • isNosz

      public boolean isNosz()
      Returns:
      true if the NOSZ (no-size) flag is set, meaning output size is externally provided.
    • isCAT

      public boolean isCAT()
      Returns:
      true if the CAT (concatenation/uncompressed) flag is set.
    • isRLE

      public boolean isRLE()
      Returns:
      true if the RLE (run-length encoding) preprocessing flag is set.
    • isPack

      public boolean isPack()
      Returns:
      true if the PACK (bit-packing) preprocessing flag is set.