[][src]Function laz::las::laszip::decompress_buffer

pub fn decompress_buffer(
    compressed_points_data: &[u8],
    decompressed_points: &mut [u8],
    laz_vlr: LazVlr
) -> Result<()>

Decompresses all points from the buffer

The compressed_points_data slice must contain all the laszip data that means:

  1. The offset to the chunk table (i64)
  2. the compressed points
  3. the chunk table (optional)

This fn will decompress as many points as the decompress_points can hold.

Important

In a LAZ file, the chunk table offset is counted from the start of the LAZ file. Here since we only have the buffer points data, you must make sure the offset is counted since the start of point data.

So you should update the value before calling this function. Otherwise you will get an IoError like 'failed to fill whole buffer' due to this function seeking past the end of the data.