Class LTF8
java.lang.Object
htsjdk.samtools.cram.io.LTF8
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic longreadUnsignedLTF8(CRAMByteReader reader) Reads an unsigned LTF8 long from aCRAMByteReader.static longreadUnsignedLTF8(InputStream inputStream) Reads an unsigned long value from the input stream.static intwriteUnsignedLTF8(long value, CRAMByteWriter writer) Writes an unsigned LTF8 long to aCRAMByteWriter.static intwriteUnsignedLTF8(long value, OutputStream outputStream) Writes an unsigned long value to the output stream.
-
Constructor Details
-
LTF8
public LTF8()
-
-
Method Details
-
readUnsignedLTF8
Reads an unsigned long value from the input stream. The sign bit should be interpreted just as other bits in the value.- Parameters:
inputStream- input stream to be read from- Returns:
- value encoded in the stream as LTF8
-
readUnsignedLTF8
Reads an unsigned LTF8 long from aCRAMByteReader. Equivalent to the InputStream version but avoids synchronized method call overhead.- Parameters:
reader- the reader to read from- Returns:
- the decoded value
-
writeUnsignedLTF8
Writes an unsigned LTF8 long to aCRAMByteWriter. Equivalent to the OutputStream version but avoids synchronized method call overhead.- Parameters:
value- the value to writewriter- the writer to write to- Returns:
- number of bits written
-
writeUnsignedLTF8
Writes an unsigned long value to the output stream. The sign bit is interpreted just as other bits in the value.- Parameters:
value- the value to be writtenoutputStream- the output stream to write to- Returns:
- the number of bits written
-