Function serialize_seq_bin

Source
pub fn serialize_seq_bin(seq: &[Nucleotide]) -> Vec<u8> 
Expand description

A compact binary serialization of our sequence. Useful for file storage. The first four bytes is sequence length, big endian; we need this, since one of our nucleotides necessarily serializes to 0b00.

MSB. Nucleotides are right-to-left in a given byte. Example: A byte containing nucleotides TCAG is 0b1110_0100.