Struct laz::laszip::parallel::ParLasZipAppender
source · pub struct ParLasZipAppender<W> { /* private fields */ }
Expand description
Struct that handles appending compressed points to a LAZ file in parallel
Implementations§
source§impl<W> ParLasZipAppender<W>
impl<W> ParLasZipAppender<W>
sourcepub fn new(data: W, vlr: LazVlr) -> Result<Self>
pub fn new(data: W, vlr: LazVlr) -> Result<Self>
data must be positioned at the start of point data
sourcepub fn done(&mut self) -> Result<()>
pub fn done(&mut self) -> Result<()>
Tells the compressor that no more points will be compressed
- Compresses & writes the rest of the points to form the last chunk
- Writes the chunk table
- update the offset to the chunk_table
pub fn get_mut(&mut self) -> &mut W
source§impl<W> ParLasZipAppender<W>
impl<W> ParLasZipAppender<W>
sourcepub fn compress_many(&mut self, points: &[u8]) -> Result<()>
pub fn compress_many(&mut self, points: &[u8]) -> Result<()>
sourcepub fn compress_chunks<Chunks, Item>(&mut self, chunks: Chunks) -> Result<()>
pub fn compress_chunks<Chunks, Item>(&mut self, chunks: Chunks) -> Result<()>
Compresses multiple chunks using multiple threads.
§Important
This must be called only when writing variable-size chunks. This will panic otherwise.
§Note
For this function to actually use multiple threads, there should be more than one chunk.
buffer shall hold more points that the vlr’s chunk_size
.
Auto Trait Implementations§
impl<W> Freeze for ParLasZipAppender<W>where
W: Freeze,
impl<W> RefUnwindSafe for ParLasZipAppender<W>where
W: RefUnwindSafe,
impl<W> Send for ParLasZipAppender<W>where
W: Send,
impl<W> Sync for ParLasZipAppender<W>where
W: Sync,
impl<W> Unpin for ParLasZipAppender<W>where
W: Unpin,
impl<W> UnwindSafe for ParLasZipAppender<W>where
W: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more