This project is a 7z compressor/decompressor written in pure rust. And it's very much inspired by the apache commons-compress project.
The LZMA/LZMA2 decoder and all filters code was ported from tukaani xz for java
Decompression
Supported codecs:
- BZIP2 (require feature 'bzip2')
- COPY
- LZMA
- LZMA2
- ZSTD (require feature 'zstd')
Supported filters:
- BCJ X86
- BCJ PPC
- BCJ IA64
- BCJ ARM
- BCJ ARM_THUMB
- BCJ SPARC
- DELTA
Usage
[dependencies]
sevenz-rust={version="0.2"}
Decompress source file "data/sample.7z" to dest path "data/sample"
.expect;
decompress_file
Decompress a encrypted 7z file
Add 'aes256' feature
[dependencies]
sevenz-rust={version="0.2", features=["aes256"]}
.expect;
decompress_file_with_password
Compression
Currently only support LZMA2 method.
[dependencies]
sevenz-rust={version="0.2", features=["compress"]}
Use the helper function to create a 7z file with source path.
.expect;
compress_to_path
With AES encryption
require version>=0.3.0
[dependencies]
sevenz-rust={version="0.3", features=["compress","aes256"]}
Use the helper function to create a 7z file with source path and password.
.expect;
compress_to_path_encrypted