pub fn all_chunks(mut self, pedantic: bool) -> Result<AllChunksReader<R>> {
        let total_chunk_count = {
            if pedantic {
                let offset_tables = MetaData::read_offset_tables(&mut self.remaining_reader, &self.meta_data.headers)?;
                validate_offset_tables(self.meta_data.headers.as_slice(), &offset_tables, self.remaining_reader.byte_position())?;
                offset_tables.iter().map(|table| table.len()).sum()
            }
            else {
                usize::try_from(MetaData::skip_offset_tables(&mut self.remaining_reader, &self.meta_data.headers)?)
                    .expect("too large chunk count for this machine")
            }
        };

        Ok(AllChunksReader {
            meta_data: self.meta_data,
            remaining_chunks: 0 .. total_chunk_count,
            remaining_bytes: self.remaining_reader,
            pedantic
        })
    }
/// Prepare to read all the chunks from the file.
/// Does not decode the chunks now, but returns a decoder.
/// Reading all chunks reduces seeking the file, but some chunks might be read without being used.
Prepare to read all the chunks from the file.
Does not decode the chunks now, but returns a decoder.
Reading all chunks reduces seeking the file, but some chunks might be read without being used.
Prepare to read all the chunks from the file . Does not decode the chunks now but returns a decoder . Reading all chunks reduces seeking the file but some chunks might be read without being used .
pub fn all_chunks(mut self, pedantic: bool) -> Result<AllChunksReader<R>> {
        let total_chunk_count = {
            if pedantic {
                let offset_tables = MetaData::read_offset_tables(&mut self.remaining_reader, &self.meta_data.headers)?;
                validate_offset_tables(self.meta_data.headers.as_slice(), &offset_tables, self.remaining_reader.byte_position())?;
                offset_tables.iter().map(|table| table.len()).sum()
            }
            else {
                usize::try_from(MetaData::skip_offset_tables(&mut self.remaining_reader, &self.meta_data.headers)?)
                    .expect("too large chunk count for this machine")
            }
        };
        Ok(AllChunksReader {
            meta_data: self.meta_data,
            remaining_chunks: 0 .. total_chunk_count,
            remaining_bytes: self.remaining_reader,
            pedantic
        })
    }
pub fn all_chunks ( mut self , pedantic : bool ) -> Result < AllChunksReader < R > > { let total_chunk_count = { if pedantic { let offset_tables = MetaData :: read_offset_tables ( & mut self . remaining_reader , & self . meta_data . headers ) ? ; validate_offset_tables ( self . meta_data . headers . as_slice ( ) , & offset_tables , self . remaining_reader . byte_position ( ) ) ? ; offset_tables . iter ( ) . map ( | table | table . len ( ) ) . sum ( ) } else { usize :: try_from ( MetaData :: skip_offset_tables ( & mut self . remaining_reader , & self . meta_data . headers ) ? ) . expect ( " " ) } } ; Ok ( AllChunksReader { meta_data : self . meta_data , remaining_chunks : 0 .. total_chunk_count , remaining_bytes : self . remaining_reader , pedantic } ) }
Prepare to read all the chunks from the file.
Prepare to read all the chunks from the file .
mut self
pedantic
bool
mut self
pedantic
bool