/// Fetch and decompress a data block.
Fetch and decompress a data block.
Fetch and decompress a data block .
fn fetch_block(inner_column: &mut Inner, block_num: usize) -> Result<()> {
    let field = &inner_column.field;
    let block_meta = inner_column.meta.view_blocks(field).get(block_num).unwrap();
    let reader = &inner_column.reader;
    let block_size = inner_column.meta.view_blocks_sizes(field)[block_num as usize];
    let data =
        &reader[(block_meta.seekpos as usize)..(block_meta.seekpos + block_size as u64) as usize];
    inner_column.buffer.clear();
    let codec = inner_column.meta.get_field_codec(field);
    decompress_block(data, &mut inner_column.buffer, codec).expect("Decompression failed.");
    Ok(())
}
fn fetch_block ( inner_column : & mut Inner , block_num : usize ) -> Result < ( ) > { let field = & inner_column . field ; let block_meta = inner_column . meta . view_blocks ( field ) . get ( block_num ) . unwrap ( ) ; let reader = & inner_column . reader ; let block_size = inner_column . meta . view_blocks_sizes ( field ) [ block_num as usize ] ; let data = & reader [ ( block_meta . seekpos as usize ) .. ( block_meta . seekpos + block_size as u64 ) as usize ] ; inner_column . buffer . clear ( ) ; let codec = inner_column . meta . get_field_codec ( field ) ; decompress_block ( data , & mut inner_column . buffer , codec ) . expect ( " " ) ; Ok ( ( ) ) }
Fetch and decompress a data block.
Fetch and decompress a data block .
inner_column
&mut Inner
block_num
usize