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