fn decompress_parallel(
        self, pedantic: bool,
        mut insert_block: impl FnMut(&MetaData, UncompressedBlock) -> UnitResult
    ) -> UnitResult
    {
        let mut decompressor = match self.parallel_decompressor(pedantic) {
            Err(old_self) => return old_self.decompress_sequential(pedantic, insert_block),
            Ok(decompressor) => decompressor,
        };

        while let Some(block) = decompressor.next() {
            insert_block(decompressor.meta_data(), block?)?;
        }

        debug_assert_eq!(decompressor.len(), 0, "compressed blocks left after decompressing all blocks");
        Ok(())
    }
/// Decompress all blocks in the file, using multiple cpu cores, and call the supplied closure for each block.
/// The order of the blocks is not deterministic.
/// You can also use `parallel_decompressor` to obtain an iterator instead.
// FIXME try async + futures instead of rayon! Maybe even allows for external async decoding? (-> impl Stream<UncompressedBlock>)
Decompress all blocks in the file, using multiple cpu cores, and call the supplied closure for each block.
The order of the blocks is not deterministic.
You can also use `parallel_decompressor` to obtain an iterator instead.
FIXME try async + futures instead of rayon. Maybe even allows for external async decoding. (-> impl Stream)
Decompress all blocks in the file using multiple cpu cores and call the supplied closure for each block . The order of the blocks is not deterministic . You can also use ` parallel_decompressor ` to obtain an iterator instead . FIXME try async + futures instead of rayon . Maybe even allows for external async decoding . ( - > impl Stream )
fn decompress_parallel(
        self, pedantic: bool,
        mut insert_block: impl FnMut(&MetaData, UncompressedBlock) -> UnitResult
    ) -> UnitResult
    {
        let mut decompressor = match self.parallel_decompressor(pedantic) {
            Err(old_self) => return old_self.decompress_sequential(pedantic, insert_block),
            Ok(decompressor) => decompressor,
        };
        while let Some(block) = decompressor.next() {
            insert_block(decompressor.meta_data(), block?)?;
        }
        debug_assert_eq!(decompressor.len(), 0, "compressed blocks left after decompressing all blocks");
        Ok(())
    }
fn decompress_parallel ( self , pedantic : bool , mut insert_block : impl FnMut ( & MetaData , UncompressedBlock ) -> UnitResult ) -> UnitResult { let mut decompressor = match self . parallel_decompressor ( pedantic ) { Err ( old_self ) => return old_self . decompress_sequential ( pedantic , insert_block ) , Ok ( decompressor ) => decompressor , } ; while let Some ( block ) = decompressor . next ( ) { insert_block ( decompressor . meta_data ( ) , block ? ) ? ; } debug_assert_eq ! ( decompressor len ( ) 0 " " ) ; Ok ( ( ) ) }
Decompress all blocks in the file, using multiple cpu cores, and call the supplied closure for each block.
Decompress all blocks in the file using multiple cpu cores and call the supplied closure for each block .
self
pedantic
bool
insert_block
impl FnMut(&MetaData, UncompressedBlock) -> UnitResult
self
pedantic
bool
insert_block
impl FnMut(&MetaData, UncompressedBlock) -> UnitResult