Class NameTokenisationEncode

java.lang.Object
htsjdk.samtools.cram.compression.nametokenisation.NameTokenisationEncode

public class NameTokenisationEncode extends Object
Name tokenization encoder that compresses read names by tokenizing them and encoding each token stream independently using rANS or arithmetic coding. Uses per-token-type flag selection to match htslib's tok3 encoder behavior.
  • Constructor Details

    • NameTokenisationEncode

      public NameTokenisationEncode()
  • Method Details

    • compress

      public ByteBuffer compress(ByteBuffer inBuffer, boolean useArith, byte nameSeparator)
      Compress the input buffer of read names.
      Parameters:
      inBuffer - formatted as read names separated by the byte specified by the nameSeparator parameter (this generally happens as a result of using the ByteStopCodec to write the read names)
      useArith - true if the arithmetic coder should be used
      nameSeparator - name separator
      Returns:
      the compressed buffer