Function read_compressed_block

Source
unsafe fn read_compressed_block(
    reader: &mut BufReader<File>,
    block: &ModuleBlockEntry,
    data: &mut [u8],
) -> Result<()>
Expand description

Reads and decompresses a compressed block of data.

This function reads a compressed block from the file, decompresses it, and then copies the decompressed data into the appropriate section of the output buffer.

§Arguments

  • reader - A mutable reference to a BufReader<File> from which to read the data.
  • block - A reference to the ModuleBlockEntry containing metadata about the block.
  • data - A mutable slice where the decompressed data will be stored.

§Errors

§Safety

  • This function is unsafe because it calls the decompress function, which is unsafe.