9 "golang.org/x/crypto/blake2b"
12 type CompactGenome struct {
14 Variants []tileVariantID
17 type CompactSequence struct {
19 TileSequences map[string][]tileLibRef
22 type TileVariant struct {
25 Blake2b [blake2b.Size256]byte
29 type LibraryEntry struct {
31 CompactGenomes []CompactGenome
32 CompactSequences []CompactSequence
33 TileVariants []TileVariant
36 func ReadCompactGenomes(rdr io.Reader) ([]CompactGenome, error) {
37 var ret []CompactGenome
38 err := DecodeLibrary(rdr, func(ent *LibraryEntry) error {
39 ret = append(ret, ent.CompactGenomes...)
45 func DecodeLibrary(rdr io.Reader, cb func(*LibraryEntry) error) error {
46 dec := gob.NewDecoder(bufio.NewReaderSize(rdr, 1<<26))
50 err = dec.Decode(&ent)