[][src]Module bam::bgzip

Bgzip files (BGZF) and bgzip blocks.

This modules contains several readers and writers of Bgzip files:

Readers

Writers

  • Writer - writes whole bgzip blocks.
  • Sentence Writer - wrapper around the Writer, that implements the Write trait. In addition, it allows to end sentences - marks points, in which it is preferable to break the stream and start a new bgzip block. For example, each BAM record represents a separate sentence, and SentenceWriter will try not to split a record between two blocks.

Structs

Block

Bgzip block. Both uncompressed and compressed size should not be bigger than MAX_BLOCK_SIZE = 65536.

ChunksReader

Reader of Bgzip blocks given for a vector of chunks. Wrapper of SeekReader.

ConsecutiveReader

Consecutive reader of a bgzip file, it does not support random access, but also does not spend memory and time on caching.

SeekReader

Bgzip file reader, which allows to open bgzip blocks given an offset.

SeekReaderBuilder

Builder of bgzip file reader

SentenceWriter

A struct that allows to write bgzip files in sentences.

Writer

Bgzip writer, that allows to compress and write blocks with uncompressed size at most MAX_BLOCK_SIZE = 65536.

Enums

BlockError

io::Error produced while reading a bgzip block.

Constants

MAX_BLOCK_SIZE

Biggest possible compressed and uncompressed size