Package htsjdk.samtools.cram.compression.nametokenisation

# Class NameTokenisationDecode

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

public class NameTokenisationDecode extends Object
CRAM 3.1 NameTokenisation decoder, used to compress read names in CRAM files. The NameTokeniser codec exploits the fact that read names typically follow a structured pattern consisting of alternating alpha and numeric components (i.e., "H0164ALXX140820:2:1101:17727:54981") that can be tokenised and then encoded as one or more differences relative to a previously tokenised name. Uses the rAnsNx16 and/or range codecs internally to compress the resulting token streams.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`DEFAULT_POSITION_ALLOCATION`
`static final byte`
`NAME_SEPARATOR`

## Constructor Summary

Constructors
Constructor
Description
`NameTokenisationDecode()`

## Method Summary

Modifier and Type
Method
Description
`byte[]`
`uncompress(ByteBuffer inBuffer, byte nameSeparator)`
Uncompress the compressed name data in the input buffer.

### Methods inherited from class java.lang.Object

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

## Field Details

### NAME_SEPARATOR

public static final byte NAME_SEPARATOR

See Also:
  - Constant Field Values

### DEFAULT_POSITION_ALLOCATION

public static final int DEFAULT_POSITION_ALLOCATION

See Also:
  - Constant Field Values

## Constructor Details

### NameTokenisationDecode

public NameTokenisationDecode()

## Method Details

### uncompress

public byte[] uncompress(ByteBuffer inBuffer, byte nameSeparator)
Uncompress the compressed name data in the input buffer. Return is a byte[] containing the read names, each separated by the byte value specified by nameSeparator, including a terminating separator.

Parameters:
  `inBuffer` - the buffer to uncompress
  `nameSeparator` - the name separator byte to use in the output buffer
Returns:
  the uncompressed read names