Giter Site home page Giter Site logo

sevenz-rust's Introduction

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.

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.9"}

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

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.

sevenz_rust::compress_to_path("examples/data/sample", "examples/data/sample.7z").expect("compress ok");

sevenz-rust's People

Contributors

dyz1990 avatar bfrazho avatar marcospb19 avatar xmakro avatar tomicyo avatar sorairolake avatar nlfiedler avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.