#xz #lzma #encoding #api-bindings #wasm

liblzma

Rust bindings to liblzma providing Read/Write streams as well as low-level in-memory encoding/decoding. forked from xz2.

13 releases

0.3.5 Oct 28, 2024
0.3.3 Jul 30, 2024
0.3.0 Feb 26, 2024
0.2.1 Oct 4, 2023

#42 in Compression

Download history 2362/week @ 2024-08-17 2257/week @ 2024-08-24 2425/week @ 2024-08-31 2087/week @ 2024-09-07 1935/week @ 2024-09-14 3554/week @ 2024-09-21 4311/week @ 2024-09-28 6877/week @ 2024-10-05 7340/week @ 2024-10-12 5415/week @ 2024-10-19 8296/week @ 2024-10-26 6843/week @ 2024-11-02 5295/week @ 2024-11-09 6099/week @ 2024-11-16 6661/week @ 2024-11-23 8108/week @ 2024-11-30

27,752 downloads per month
Used in 20 crates (12 directly)

MIT/Apache

4MB
56K SLoC

C 26K SLoC // 0.3% comments PO File 23K SLoC // 0.4% comments Rust 4.5K SLoC // 0.0% comments M4 734 SLoC // 0.4% comments Automake 648 SLoC // 0.1% comments Shell 575 SLoC // 0.3% comments BASH 455 SLoC // 0.3% comments GNU Style Assembly 306 SLoC // 0.4% comments Bitbake 246 SLoC // 0.1% comments Batch 30 SLoC

liblzma

CI Crates.io

Documentation

Bindings to the liblzma implementation in Rust, also provides types to read/write xz streams.

This crate is forked from xz2 and liblzma = "0.1.x" is fully compatible with xz2 = "0.1.7", so you can migrate simply.

Migrate from xz2

# Cargo.toml
[dependencies]
-xz2 = "0.1.7"
+liblzma = "0.1.7"
// *.rs
-use xz2;
+use liblzma;

Version 0.2.x breaking changes

  • XZ upgraded to 5.4
  • Multithreading is disabled by default. This feature is available by enabling the parallel feature
  • Support compile to webassembly

Version 0.3.x breaking changes

  • XZ upgraded to 5.6

License

This project is licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in liblzma by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies