/sevenz-rust

A 7z decompressor written in pure rust

Primary LanguageRustApache License 2.0Apache-2.0

Crate Documentation

This project is a 7z compressor/decompressor written in pure rust.
And it's very much inspired by the apache commons-compress project.

Decompression

Supported codecs:

  • COPY
  • LZMA
  • LZMA2

Supported filters:

  • BCJ X86
  • BCJ PPC
  • BCJ IA64
  • BCJ ARM
  • BCJ ARM_THUMB
  • BCJ SPARC
  • DELTA

The dependence of lzma-rs was removed sine 0.1.3.
The LZMA/LZMA2 decoder and all filters code was ported from tukaani xz for java

Usage

[dependencies]
sevenz-rust={version="0.1.5"}

Decompress source file "data/sample.7z" to dest path "data/sample"

sevenz_rust::decompress_file("data/sample.7z", "data/sample").expect("complete");

Decompress a encrypted 7z file

Add 'aes256' feature

[dependencies]
sevenz-rust={version="0.1.5", features=["aes256"]}
sevenz_rust::decompress_file_with_password("path/to/encrypted.7z", "path/to/output", "password".into()).expect("complete");

Compression

The compression feature is under development.

Dependencies