# 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 Summary

Constructors
Constructor
Description
`NameTokenisationEncode()`

## Method Summary

Modifier and Type
Method
Description
`ByteBuffer`
`compress(ByteBuffer inBuffer, boolean useArith, byte nameSeparator)`
Compress the input buffer of read names.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## 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