[−][src]Module bam::bgzip
Bgzip files (BGZF) and bgzip blocks.
This modules contains several readers and writers of Bgzip files:
Readers
- Consecutive Reader - reads bgzip file consecutively.
- Seek Reader - seeks and reads bgzip blocks given an offset.
- Chunks Reader - wrapper around the Seek Reader, that reads multiple blocks given a vector of chunks.
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, andSentenceWriter
will try not to split a record between two blocks.
Structs
Block | Bgzip block. Both uncompressed and compressed size should not be bigger than
|
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 |
Enums
BlockError | io::Error produced while reading a bgzip block. |
Constants
MAX_BLOCK_SIZE | Biggest possible compressed and uncompressed size |