Package htsjdk.samtools.cram.structure
Enum EncodingID
- java.lang.Object
-
- java.lang.Enum<EncodingID>
-
- htsjdk.samtools.cram.structure.EncodingID
-
- All Implemented Interfaces:
Serializable
,Comparable<EncodingID>
public enum EncodingID extends Enum<EncodingID>
Encoding ID as specified by Section 3 of the CRAM spec. These are basically ways to serialize a data series.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BETA
Binary coding with sufficient leading 0 bits to store each value with the same lengthBYTE_ARRAY_LEN
A byte array serialized as [length][elements]BYTE_ARRAY_STOP
A byte array serialized as [elements][stop]EXTERNAL
Shove the data into a byte array for compressing later with a generic compressor like GZIP.GAMMA
http://en.wikipedia.org/wiki/Elias_gamma_codingGOLOMB
EXPERIMENTAL: This encoding is untested and scheduled for removal from the CRAM spec.GOLOMB_RICE
EXPERIMENTAL: This encoding is untested and scheduled for removal from the CRAM spec.HUFFMAN
http://en.wikipedia.org/wiki/Huffman_codingNULL
"Do nothing" encoding.SUBEXPONENTIAL
Subexponential codes.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getId()
static EncodingID
valueOf(String name)
Returns the enum constant of this type with the specified name.static EncodingID[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NULL
public static final EncodingID NULL
"Do nothing" encoding. Should throw an exception when trying reading or writing with this encoding.
-
EXTERNAL
public static final EncodingID EXTERNAL
Shove the data into a byte array for compressing later with a generic compressor like GZIP.
-
GOLOMB
public static final EncodingID GOLOMB
EXPERIMENTAL: This encoding is untested and scheduled for removal from the CRAM spec. http://en.wikipedia.org/wiki/Golomb_coding
-
HUFFMAN
public static final EncodingID HUFFMAN
http://en.wikipedia.org/wiki/Huffman_coding
-
BYTE_ARRAY_LEN
public static final EncodingID BYTE_ARRAY_LEN
A byte array serialized as [length][elements]
-
BYTE_ARRAY_STOP
public static final EncodingID BYTE_ARRAY_STOP
A byte array serialized as [elements][stop]
-
BETA
public static final EncodingID BETA
Binary coding with sufficient leading 0 bits to store each value with the same length
-
SUBEXPONENTIAL
public static final EncodingID SUBEXPONENTIAL
Subexponential codes. http://www.ittc.ku.edu/~jsv/Papers/HoV94.progressive_FELICS.pdf
-
GOLOMB_RICE
public static final EncodingID GOLOMB_RICE
EXPERIMENTAL: This encoding is untested and scheduled for removal from the CRAM spec. A variant of GOLOMB encoding: http://en.wikipedia.org/wiki/Golomb_coding
-
GAMMA
public static final EncodingID GAMMA
http://en.wikipedia.org/wiki/Elias_gamma_coding
-
-
Method Detail
-
values
public static EncodingID[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (EncodingID c : EncodingID.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EncodingID valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getId
public int getId()
- Returns:
- the number assigned to each encoding in the CRAM spec
-
-