Trait bam::bgzip::read::ReadBgzip[][src]

pub trait ReadBgzip {
    fn next(&mut self) -> Result<&Block, BlockError>;
fn current(&self) -> Option<&Block>;
fn pause(&mut self); }
Expand description

A trait that allows to read blocks directly.

Required methods

Reads and returns Block. If no blocks present, the function returns BlockError::EndOfStream.

The function returns a reference to the block, not the block itself, to reuse it later, however you can clone the block, if needed.

Returns the current block, if possible. This function does not advance the stream.

Pauses multi-thread reader and does nothing for single-thread reader.

This function increases sleeping time for decompressing threads, so the threads are still active, but wake up rarely.

Implementors