Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

An LZMA decoder written in pure Rust

License

NotificationsYou must be signed in to change notification settings

gendx/lzma-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CrateDocumentationMinimum Rust 1.71DependenciesSafety DanceBuild StatusCodecovLines of CodeDownloads (crates.io)

This project is a decoder for LZMA and its variants written in pure Rust, with focus on clarity.It already supports LZMA, LZMA2 and a subset of the.xz file format.

Usage

Decompress a.xz file.

let filename ="foo.xz";letmut f = std::io::BufReader::new(std::fs::File::open(filename).unwrap());// "decomp" can be anything that implements "std::io::Write"letmut decomp:Vec<u8> =Vec::new();lzma_rs::xz_decompress(&mut f,&mut decomp).unwrap();// Decompressed content is now in "decomp"

Encoder

For now, there is also a dumb encoder that only uses byte literals, with many hard-coded constants for code simplicity.Better encoders are welcome!

Contributing

Pull-requests are welcome, to improve the decoder, add better encoders, or more tests.Ultimately, this project should also implement .xz and .7z files.

License

MIT

About

An LZMA decoder written in pure Rust

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp