Struct laz::laszip::LasZipDecompressor
source · [−]Expand description
LasZip decompressor that decompresses points.
Supports both fixed-size and variable-size chunks.
Implementations
sourceimpl<'a, R: Read + Seek + Send + 'a> LasZipDecompressor<'a, R>
impl<'a, R: Read + Seek + Send + 'a> LasZipDecompressor<'a, R>
sourcepub fn new(source: R, vlr: LazVlr) -> Result<Self>
pub fn new(source: R, vlr: LazVlr) -> Result<Self>
Creates a new instance from a data source of compressed points and the LazVlr describing the compressed data
sourcepub fn decompress_one(&mut self, out: &mut [u8]) -> Result<()>
pub fn decompress_one(&mut self, out: &mut [u8]) -> Result<()>
Decompress the next point and write the uncompressed data to the out buffer.
- The buffer should have at least enough byte to store the decompressed data
- The data is written in the buffer exactly as it would have been in a LAS File in Little Endian order,
sourcepub fn decompress_many(&mut self, out: &mut [u8]) -> Result<()>
pub fn decompress_many(&mut self, out: &mut [u8]) -> Result<()>
Decompress as many points as the out
slice can hold
Note
If the out
slice contains more space than there are points
the function will still decompress and thus and error will occur
sourcepub fn seek(&mut self, point_idx: u64) -> Result<()>
pub fn seek(&mut self, point_idx: u64) -> Result<()>
Seeks to the point designed by the index
Important
Seeking in compressed data has a higher cost than non compressed data because the stream has to be moved to the start of the chunk and then we have to decompress points in the chunk until we reach the one we want.
sourcepub fn into_inner(self) -> R
pub fn into_inner(self) -> R
Consumes the decompressor and returns the data source.
pub fn get_mut(&mut self) -> &mut R
Trait Implementations
sourceimpl<'a, R: Read + Seek + Send> LasPointReader for LasZipDecompressor<'a, R>
impl<'a, R: Read + Seek + Send> LasPointReader for LasZipDecompressor<'a, R>
Auto Trait Implementations
impl<'a, R> !RefUnwindSafe for LasZipDecompressor<'a, R>
impl<'a, R> Send for LasZipDecompressor<'a, R>
impl<'a, R> !Sync for LasZipDecompressor<'a, R>
impl<'a, R> Unpin for LasZipDecompressor<'a, R>
impl<'a, R> !UnwindSafe for LasZipDecompressor<'a, R>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more