sevenz_rust2/lib.rs
1//! This project is a 7z compressor/decompressor written in pure Rust.
2//!
3//! This is a fork of the original, unmaintained sevenz-rust crate to continue the development
4//! and maintenance.
5//!
6//! ## Supported Codecs & filters
7//!
8//! | Codec | Decompression | Compression |
9//! |----------------|---------------|-------------|
10//! | COPY | ✓ | ✓ |
11//! | LZMA | ✓ | ✓ |
12//! | LZMA2 | ✓ | ✓ |
13//! | BROTLI (*) | ✓ | ✓ |
14//! | BZIP2 | ✓ | ✓ |
15//! | DEFLATE (*) | ✓ | ✓ |
16//! | PPMD | ✓ | ✓ |
17//! | LZ4 (*) | ✓ | ✓ |
18//! | ZSTD (*) | ✓ | ✓ |
19//!
20//! (*) Require optional cargo feature.
21//!
22//! | Filter | Decompression | Compression |
23//! |---------------|---------------|-------------|
24//! | BCJ X86 | ✓ | |
25//! | BCJ PPC | ✓ | |
26//! | BCJ IA64 | ✓ | |
27//! | BCJ ARM | ✓ | |
28//! | BCJ ARM64 | ✓ | |
29//! | BCJ ARM_THUMB | ✓ | |
30//! | BCJ SPARC | ✓ | |
31//! | DELTA | ✓ | ✓ |
32//! | BCJ2 | ✓ | |
33#![cfg_attr(docsrs, feature(doc_cfg))]
34#![warn(missing_docs)]
35
36#[cfg(target_arch = "wasm32")]
37extern crate wasm_bindgen;
38
39#[cfg(feature = "compress")]
40mod encoder;
41/// Encoding options when compressing.
42#[cfg_attr(docsrs, doc(cfg(feature = "compress")))]
43#[cfg(feature = "compress")]
44pub mod encoder_options;
45mod encryption;
46mod error;
47mod reader;
48
49#[cfg(feature = "compress")]
50mod writer;
51
52pub(crate) mod archive;
53pub(crate) mod bitset;
54pub(crate) mod block;
55mod codec;
56pub(crate) mod decoder;
57mod filter;
58
59mod time;
60#[cfg(feature = "util")]
61mod util;
62
63pub use archive::*;
64pub use block::*;
65pub use encryption::Password;
66pub use error::Error;
67pub use reader::{ArchiveReader, BlockDecoder};
68pub use time::NtTime;
69#[cfg(all(feature = "compress", feature = "util", not(target_arch = "wasm32")))]
70pub use util::compress::*;
71#[cfg(all(feature = "util", not(target_arch = "wasm32")))]
72pub use util::decompress::*;
73#[cfg(all(feature = "util", target_arch = "wasm32"))]
74pub use util::wasm::*;
75#[cfg(feature = "compress")]
76pub use writer::*;