[][src]Struct laz::las::laszip::LasZipDecompressor

pub struct LasZipDecompressor<'a, R: Read + Seek + 'a> { /* fields omitted */ }

Struct that handles the decompression of the points written in a LAZ file

Implementations

impl<'a, R: Read + Seek + Send + 'a> LasZipDecompressor<'a, R>[src]

pub fn new(mut source: R, vlr: LazVlr) -> Result<Self>[src]

Creates a new instance from a data source of compressed points and the LazVlr describing the compressed data

pub fn new_with_record_data(
    source: R,
    laszip_vlr_record_data: &[u8]
) -> Result<Self>
[src]

Creates a new instance from a data source of compressed points and the record data of the laszip vlr

pub fn decompress_one(&mut self, mut out: &mut [u8]) -> Result<()>[src]

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,

pub fn decompress_many(&mut self, out: &mut [u8]) -> Result<()>[src]

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

pub fn vlr(&self) -> &LazVlr[src]

pub fn seek(&mut self, point_idx: u64) -> Result<()>[src]

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.

pub fn into_inner(self) -> R[src]

pub fn get_mut(&mut self) -> &mut R[src]

pub fn get(&self) -> &R[src]

Trait Implementations

impl<'a, R: Read + Seek + Send> LasPointReader for LasZipDecompressor<'a, R>[src]

Auto Trait Implementations

impl<'a, R> !RefUnwindSafe for LasZipDecompressor<'a, R>[src]

impl<'a, R> Send for LasZipDecompressor<'a, R>[src]

impl<'a, R> !Sync for LasZipDecompressor<'a, R>[src]

impl<'a, R> Unpin for LasZipDecompressor<'a, R>[src]

impl<'a, R> !UnwindSafe for LasZipDecompressor<'a, R>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.