Debian Codegraph @

src/lz4/mod.rs

raw symbols SCIP
1 //! LZ4 compression and decompression.
2 //!
3 //! LZ4: Extremely fast compression algorithm.
4 //!
5 //! # Acceleration factor
6 //! Some functions take the acceleration factor.
7 //!
8 //! Larger value increases the processing speed in exchange for the
9 //! lesser compression ratio.
10 //!
11 //! ```
12 //! # use lzzzz::lz4;
13 //! # let data = b"The quick brown fox jumps over the lazy dog.";
14 //! # let mut buf = Vec::new();
15 //! // The default factor is 1 so both have the same meaning.
16 //! lz4::compress_to_vec(data, &mut buf, lz4::ACC_LEVEL_DEFAULT)?;
17 //! lz4::compress_to_vec(data, &mut buf, 1)?;
18 //!
19 //! // Factors lower than 1 are interpreted as 1 so these are also the same as above.
20 //! lz4::compress_to_vec(data, &mut buf, 0)?;
21 //! lz4::compress_to_vec(data, &mut buf, -100)?;
22 //!
23 //! // Faster but less effective compression.
24 //! lz4::compress_to_vec(data, &mut buf, 1000)?;
25 //!
26 //! # Ok::<(), std::io::Error>(())
27 //! ```
28
29 mod bindingrust-analyzer cargo lzzzz 2.0.0 lz4/binding/;
30 mod blockrust-analyzer cargo lzzzz 2.0.0 lz4/block/;
31 mod streamrust-analyzer cargo lzzzz 2.0.0 lz4/stream/;
32
33 pub use blockrust-analyzer cargo lzzzz 2.0.0 lz4/block/::*;
34 pub use streamrust-analyzer cargo lzzzz 2.0.0 lz4/stream/::*;
35
36 /// Predefined acceleration level (1).
37 pub const ACC_LEVEL_DEFAULTrust-analyzer cargo lzzzz 2.0.0 lz4/ACC_LEVEL_DEFAULT.: i32 = 1;