Expand description
DNA nucleotide encoding
This module implements the 2-bit encoding scheme for DNA nucleotides, matching the C++ SSHash implementation exactly.
Default encoding (SSHash custom):
- A (65/97) -> 00
- C (67/99) -> 01
- G (71/103) -> 11
- T (84/116) -> 10
Enums§
- Encoding
Error - Error type for encoding operations
Functions§
- complement_
base - Get the complement of a DNA base (encoded)
- decode_
base - Decode a 2-bit value to DNA nucleotide (uppercase)
- decode_
string - Decode a bit-packed representation back to a DNA string
- encode_
base - Encode a single DNA nucleotide to 2 bits
- encode_
sequence - Encode a DNA sequence (byte slice) to a bit-packed representation
- encode_
string - Encode a DNA string to a bit-packed representation