Skip to main content

lz4rip_encode/
lib.rs

1//! LZ4 block compression.
2
3#![deny(warnings)]
4#![deny(missing_docs)]
5#![cfg_attr(not(feature = "std"), no_std)]
6#![cfg_attr(feature = "nightly", feature(optimize_attribute))]
7#![cfg_attr(feature = "paranoid", forbid(unsafe_code))]
8
9#[cfg(feature = "alloc")]
10extern crate alloc;
11
12#[forbid(unsafe_code)]
13mod compress;
14#[cfg(feature = "alloc")]
15mod compressor;
16#[cfg(feature = "alloc")]
17#[forbid(unsafe_code)]
18mod dict;
19pub(crate) mod hashtable;
20mod verified_sink;
21
22#[cfg(feature = "alloc")]
23pub use compress::compress;
24pub use compress::{
25    CompressorRef, CompressorRefN, DEFAULT_DICT_ENTRIES, DEFAULT_NODICT_ENTRIES, DictCompressorRef,
26    DictCompressorRefN, MIN_ENTRIES, compress_into, compress_into_with_dict,
27    get_maximum_output_size,
28};
29#[cfg(feature = "alloc")]
30pub use compressor::{Compressor, CompressorN, DictCompressor, DictCompressorN};
31#[cfg(feature = "alloc")]
32pub use dict::DictTrainer;
33pub use lz4rip_core::CompressError;
34
35// Cross-crate plumbing for the lz4rip facade (frame module + tests).
36// Public for workspace access but not part of the stable API.
37#[doc(hidden)]
38pub use compress::{
39    compress_into_sink_with_dict, compress_into_sink_with_table, seed_table_with_input,
40    write_integer,
41};
42#[doc(hidden)]
43pub use hashtable::HashTableU32;