pub struct Compressor<'a> { /* private fields */ }
Expand description

Streaming LZ4_HC compressor.

Example

use lzzzz::{lz4, lz4_hc};

let data = b"The quick brown fox jumps over the lazy dog.";
let mut buf = [0u8; 256];

// The slice should have enough capacity.
assert!(buf.len() >= lz4::max_compressed_size(data.len()));

let mut comp = lz4_hc::Compressor::new()?;
let len = comp.next(data, &mut buf)?;
let compressed = &buf[..len];

Implementations

Creates a new Compressor.

Creates a new Compressor with a dictionary.

Sets the compression level.

Sets the decompression speed mode flag.

Performs LZ4_HC streaming compression.

Returns the number of bytes written into the destination buffer.

Compresses data until the destination slice fills up.

Returns the number of bytes written into the destination buffer.

Appends a compressed frame to Vec.

Returns the number of bytes appended to the given Vec<u8>.

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

Performs the conversion.

Performs the conversion.

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.