#lzma #xz

sys liblzma-sys

Raw bindings to liblzma which contains an implementation of LZMA and xz stream encoding/decoding. High level Rust bindings are available in the liblzma crate

26 releases

new 0.4.5 Jan 20, 2026
0.4.4 Jun 6, 2025
0.4.3 Apr 14, 2025
0.4.1 Mar 28, 2025
0.2.4 Nov 23, 2023

#428 in WebAssembly

Download history 331355/week @ 2025-09-30 273004/week @ 2025-10-07 275679/week @ 2025-10-14 283941/week @ 2025-10-21 312859/week @ 2025-10-28 300760/week @ 2025-11-04 298086/week @ 2025-11-11 302987/week @ 2025-11-18 182374/week @ 2025-11-25 265433/week @ 2025-12-02 458494/week @ 2025-12-09 375413/week @ 2025-12-16 117980/week @ 2025-12-23 166647/week @ 2025-12-30 375823/week @ 2026-01-06 445009/week @ 2026-01-13

1,154,039 downloads per month
Used in 256 crates (via liblzma)

MIT/Apache

5MB
59K SLoC

PO File 27K SLoC // 0.5% comments C 26K SLoC // 0.3% comments Rust 2.5K SLoC // 0.0% comments M4 784 SLoC // 0.4% comments Automake 673 SLoC // 0.1% comments Shell 668 SLoC // 0.3% comments BASH 460 SLoC // 0.3% comments GNU Style Assembly 303 SLoC // 0.4% comments Bitbake 236 SLoC // 0.1% comments Batch 31 SLoC

Contains (obscure autoconf code, 48KB) xz/configure.ac

liblzma-sys

CI Crates.io

Documentation

Raw bindings to liblzma which contains an implementation of LZMA and xz stream encoding/decoding.

High level Rust bindings are available in the liblzma crate.

This crate is forked from lzma-sys and liblzma-sys = "0.1.x" is fully compatible with lzma-sys = "0.1.20", so you can migrate simply.

Migrate from lzma-sys

# Cargo.toml
[dependencies]
-lzma-sys = "0.1.20"
+liblzma-sys = "0.1.20"
// *.rs
-use lzma_sys;
+use liblzma_sys;

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 for compiling to WebAssembly

Version 0.3.x breaking changes

  • XZ upgraded to 5.6

Version 0.4.x breaking changes

  • XZ upgraded to 5.8

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-sys by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies