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
35#[cfg(target_arch = "wasm32")]
36extern crate wasm_bindgen;
37
38#[cfg(feature = "compress")]
39mod encoder;
40/// Encoding options when compressing.
41#[cfg_attr(docsrs, doc(cfg(feature = "compress")))]
42#[cfg(feature = "compress")]
43pub mod encoder_options;
44mod encryption;
45mod error;
46mod reader;
47
48#[cfg(feature = "compress")]
49mod writer;
50
51pub(crate) mod archive;
52pub(crate) mod bitset;
53pub(crate) mod block;
54mod codec;
55pub(crate) mod decoder;
56mod filter;
57
58mod time;
59#[cfg(feature = "util")]
60mod util;
61
62pub use archive::*;
63pub use block::*;
64pub use encryption::Password;
65pub use error::Error;
66pub use reader::{ArchiveReader, BlockDecoder};
67pub use time::NtTime;
68#[cfg(all(feature = "compress", feature = "util", not(target_arch = "wasm32")))]
69pub use util::compress::*;
70#[cfg(all(feature = "util", not(target_arch = "wasm32")))]
71pub use util::decompress::*;
72#[cfg(all(feature = "util", target_arch = "wasm32"))]
73pub use util::wasm::*;
74#[cfg(feature = "compress")]
75pub use writer::*;