Struct laz::LasZipCompressor

source ·
pub struct LasZipCompressor<'a, W: Write + Send + 'a> { /* private fields */ }
Expand description

Struct that handles the compression of the points into the given destination

This supports both variable-size and fixed-size chunks. Its the LazVlr that controls which type of chunks you want to write.

Fixed-Size

  • Use compress_one and/or compress_many.
  • The compressor will take care of managing the chunking.
  • Use done when you have compressed all the points you wanted.

Variable-Size

Or

  • Use compress_chunks to compress chunks.
  • Use done when you have compressed all the points you wanted.

Implementations§

Creates a compressor using the provided vlr.

Creates a new LasZipCompressor using the items provided,

If you wish to use a different chunk size see from_laz_vlr

Compress the point and write the compressed data to the destination given when the compressor was constructed

The data is written in the buffer is expected to be exactly as it would have been in a LAS File, that is:

  • The fields/dimensions are in the same order than the LAS spec says
  • The data in the buffer is in Little Endian order

Compress all the points contained in the input slice

Compresses multiple chunks

Important

This must be called only when writing variable-size chunks.

Must be called when you have compressed all your points.

Finished the current chunks.

All points compressed with the previous calls to compress_one and compress_many will form one chunk. And the subsequent calls to compress_one and compress_many will form a new chunk.

Important

Only call this when writing variable-size chunks.

Reserves and prepares the offset to chunk table that will be updated when done is called.

This method will automatically be called on the first point being compressed, but for some scenarios, manually calling this might be useful.

Returns the vlr used by this compressor

Trait Implementations§

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.