pub fn send_decompressed(
        &self,
        threadid: u8,
        nthreads: u8,
        backend: &Backend,
        tx: Sender<Chunk>,
    ) -> Result<()> {
        assert!(nthreads > 0 && threadid < nthreads);
        let mut ids: Vec<(&ChunkId, &SmallVec<[u32; 4]>)> = self
            .chunks
            .iter()
            .skip(threadid as usize)
            .step_by(nthreads as usize)
            .collect();
        // lowest seq_ids first
        ids.sort_unstable_by_key(|e| e.1[0]);
        for (id, seqs) in ids {
            let decompressed = backend.load(id).map_err(|e| ExtractError::InvalidChunk {
                seq: seqs[0],
                id: id.to_string(),
                source: e,
            })?;
            tx.send(Chunk {
                data: Data::Some(decompressed),
                seqs: seqs.clone(),
            })?;
        }
        Ok(())
    }
/// Reads chunks from disk and decompresses them. The iterator `idx` controls which chunks are
/// to be read. Parallel instances of `read` can be fed with disjunct sequences.
Reads chunks from disk and decompresses them. The iterator `idx` controls which chunks are
to be read. Parallel instances of `read` can be fed with disjunct sequences.
Reads chunks from disk and decompresses them . The iterator ` idx ` controls which chunks are to be read . Parallel instances of ` read ` can be fed with disjunct sequences .
pub fn send_decompressed(
        &self,
        threadid: u8,
        nthreads: u8,
        backend: &Backend,
        tx: Sender<Chunk>,
    ) -> Result<()> {
        assert!(nthreads > 0 && threadid < nthreads);
        let mut ids: Vec<(&ChunkId, &SmallVec<[u32; 4]>)> = self
            .chunks
            .iter()
            .skip(threadid as usize)
            .step_by(nthreads as usize)
            .collect();
        // lowest seq_ids first
        ids.sort_unstable_by_key(|e| e.1[0]);
        for (id, seqs) in ids {
            let decompressed = backend.load(id).map_err(|e| ExtractError::InvalidChunk {
                seq: seqs[0],
                id: id.to_string(),
                source: e,
            })?;
            tx.send(Chunk {
                data: Data::Some(decompressed),
                seqs: seqs.clone(),
            })?;
        }
        Ok(())
    }
pub fn send_decompressed ( & self , threadid : u8 , nthreads : u8 , backend : & Backend , tx : Sender < Chunk > , ) -> Result < ( ) > { assert ! ( nthreads 0 threadid nthreads ) ; let mut ids : Vec < ( & ChunkId , & SmallVec < [ u32 ; 4 ] > ) > = self . chunks . iter ( ) . skip ( threadid as usize ) . step_by ( nthreads as usize ) . collect ( ) ; // lowest seq_ids first ids . sort_unstable_by_key ( | e | e . 1 [ 0 ] ) ; for ( id , seqs ) in ids { let decompressed = backend . load ( id ) . map_err ( | e | ExtractError :: InvalidChunk { seq : seqs [ 0 ] , id : id . to_string ( ) , source : e , } ) ? ; tx . send ( Chunk { data : Data :: Some ( decompressed ) , seqs : seqs . clone ( ) , } ) ? ; } Ok ( ( ) ) }
Reads chunks from disk and decompresses them.
Reads chunks from disk and decompresses them .
&self
threadid
u8
nthreads
u8
backend
&Backend
tx
Sender<Chunk>
&self
threadid
u8
nthreads
u8
backend
&Backend
tx
Sender<Chunk>