DEFLATE, gzip, and zlib bindings for Rust

Overview

flate2

Crates.io Documentation

A streaming compression/decompression library DEFLATE-based streams in Rust.

This crate by default uses the miniz_oxide crate, a port of miniz.c to pure Rust. This crate also supports other backends, such as the widely available zlib library or the high-performance zlib-ng library.

Supported formats:

  • deflate
  • zlib
  • gzip
# Cargo.toml
[dependencies]
flate2 = "1.0"

Compression

use std::io::prelude::*;
use flate2::Compression;
use flate2::write::ZlibEncoder;

fn main() {
    let mut e = ZlibEncoder::new(Vec::new(), Compression::default());
    e.write_all(b"foo");
    e.write_all(b"bar");
    let compressed_bytes = e.finish();
}

Decompression

use std::io::prelude::*;
use flate2::read::GzDecoder;

fn main() {
    let mut d = GzDecoder::new("...".as_bytes());
    let mut s = String::new();
    d.read_to_string(&mut s).unwrap();
    println!("{}", s);
}

Backends

The default miniz_oxide backend has the advantage of being pure Rust, but if you're already using zlib with another C library, for example, you can use that for Rust code as well:

[dependencies]
flate2 = { version = "1.0.17", features = ["zlib"], default-features = false }

This supports either the high-performance zlib-ng backend (in zlib-compat mode) or the use of a shared system zlib library. To explicitly opt into the fast zlib-ng backend, use:

[dependencies]
flate2 = { version = "1.0.17", features = ["zlib-ng-compat"], default-features = false }

Note that if any crate in your dependency graph explicitly requests stock zlib, or uses libz-sys directly without default-features = false, you'll get stock zlib rather than zlib-ng. See the libz-sys README for details.

For compatibility with previous versions of flate2, the cloudflare optimized version of zlib is available, via the cloudflare_zlib feature. It's not as fast as zlib-ng, but it's faster than stock zlib. It requires a x86-64 CPU with SSE 4.2 or ARM64 with NEON & CRC. It does not support 32-bit CPUs at all and is incompatible with mingw. For more information check the crate documentation. Note that cloudflare_zlib will cause breakage if any other crate in your crate graph uses another version of zlib/libz.

For compatibility with previous versions of flate2, the C version of miniz.c is still available, using the feature miniz-sys.

License

This project is licensed under either of

at your option.

Contribution

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

Comments
  • failed to run custom build command for `miniz-sys v0.1.7`

    failed to run custom build command for `miniz-sys v0.1.7`

    Some PistonDeveloper projects are implicit referencing miniz-sys. On my Desktop i run into problems compiling them (named: conrod examples and imgproc examples).

    OS: Windows 8.1 (64Bit) rustc: 1.5.0 (Stable)

    failed to run custom build command for `miniz-sys v0.1.7`
    Process didn't exit successfully: `C:\Users\username\Documents\GitHub\conrod\target\
    release\build\miniz-sys-f1c39e8e406fa25f\build-script-build` (exit code: 101)
    --- stdout
    TARGET = Some("x86_64-pc-windows-gnu")
    OPT_LEVEL = Some("3")
    PROFILE = Some("release")
    TARGET = Some("x86_64-pc-windows-gnu")
    debug=false opt-level=3
    HOST = Some("x86_64-pc-windows-gnu")
    TARGET = Some("x86_64-pc-windows-gnu")
    TARGET = Some("x86_64-pc-windows-gnu")
    HOST = Some("x86_64-pc-windows-gnu")
    CC_x86_64-pc-windows-gnu = None
    CC_x86_64_pc_windows_gnu = None
    HOST_CC = None
    CC = None
    TARGET = Some("x86_64-pc-windows-gnu")
    HOST = Some("x86_64-pc-windows-gnu")
    CFLAGS_x86_64-pc-windows-gnu = None
    CFLAGS_x86_64_pc_windows_gnu = None
    HOST_CFLAGS = None
    CFLAGS = None
    running: "gcc.exe" "-O3" "-ffunction-sections" "-fdata-sections" "-m64" "-o" "C:
    \\Users\\username\\Documents\\GitHub\\conrod\\target\\release\\build\\miniz-sys-f1c3
    9e8e406fa25f\\out\\miniz.o" "-c" "miniz.c"
    ExitStatus(ExitStatus(1))
    
    command did not execute successfully, got: exit code: 1
    
    --- stderr
    gcc.exe: error: CreateProcess: No such file or directory
    thread '<main>' panicked at 'explicit panic', C:\Users\username\.cargo\registry\src\
    github.com-0a35038f75765ae4\gcc-0.3.21\src\lib.rs:772
    

    My %PATH% (relevant parts) looks like this:

    C:\Program Files\Rust stable 1.5\bin;C:\Program Files\Rust stable 1.5\bin\rustlib\x86_64-pc-windows-gnu\lib\;C:\Program Files\Rust stable 1.5\bin\rustlib\x86_64-pc-windows-gnu\bin\;C:\Program Files\Rust stable1.5\bin\;
    

    manual executing build-scrip-build.exe:

    C:\Users\username\Documents\GitHub\conrod\target\debug\build\miniz-sys-f1c39e8e406fa
    25f>build-script-build.exe
    thread '<main>' panicked at 'called `Option::unwrap()` on a `None` value', ../sr
    c/libcore\option.rs:366
    

    gcc -v output:

    Using built-in specs.
    COLLECT_GCC=gcc
    Target: x86_64-w64-mingw32
    Configured with: ../../../src/gcc-4.9.1/configure --host=x86_64-w64-mingw32 --bu
    ild=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysr
    oot=/c/mingw491/x86_64-491-win32-seh-rt_v3-rev1/mingw64 --with-gxx-include-dir=/
    mingw64/x86_64-w64-mingw32/include/c++ --enable-shared --enable-static --disable
    -multilib --enable-languages=ada,c,c++,fortran,objc,obj-c++,lto --enable-libstdc
    xx-time=yes --enable-threads=win32 --enable-libgomp --enable-libatomic --enable-
    lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --
    enable-version-specific-runtime-libs --disable-isl-version-check --disable-cloog
    -version-check --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootst
    rap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --di
    sable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 -
    -with-libiconv --with-system-zlib --with-gmp=/c/mingw491/prerequisites/x86_64-w6
    4-mingw32-static --with-mpfr=/c/mingw491/prerequisites/x86_64-w64-mingw32-static
     --with-mpc=/c/mingw491/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mi
    ngw491/prerequisites/x86_64-w64-mingw32-static --with-cloog=/c/mingw491/prerequi
    sites/x86_64-w64-mingw32-static --enable-cloog-backend=isl --with-pkgversion='x8
    6_64-win32-seh-rev1, Built by MinGW-W64 project' --with-bugurl=http://sourceforg
    e.net/projects/mingw-w64 CFLAGS='-O2 -pipe -I/c/mingw491/x86_64-491-win32-seh-rt
    _v3-rev1/mingw64/opt/include -I/c/mingw491/prerequisites/x86_64-zlib-static/incl
    ude -I/c/mingw491/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2
     -pipe -I/c/mingw491/x86_64-491-win32-seh-rt_v3-rev1/mingw64/opt/include -I/c/mi
    ngw491/prerequisites/x86_64-zlib-static/include -I/c/mingw491/prerequisites/x86_
    64-w64-mingw32-static/include' CPPFLAGS= LDFLAGS='-pipe -L/c/mingw491/x86_64-491
    -win32-seh-rt_v3-rev1/mingw64/opt/lib -L/c/mingw491/prerequisites/x86_64-zlib-st
    atic/lib -L/c/mingw491/prerequisites/x86_64-w64-mingw32-static/lib '
    Thread model: win32
    
    opened by majkcramer 38
  • undefined reference to `__assert_func'

    undefined reference to `__assert_func'

    For some reason I cannot compile this project: https://github.com/viperscape/font-atlas-example/tree/master/atlas-gen, specifically that sub-project atlas-gen. Below is the output during linking. I am using mingw gcc from cygwin (x86_64-w64-mingw32-gcc) with rust-nightly 32bit. It's very possible that this is an issue on my end, as I was able to compile this yesterday; I'm not sure what changed :-( I'm hesitant to install mingw directly because it's housed on sourceforge, which I try to avoid now a days. Any clues to what is going on here? Thanks!

    note: C:\Users\chris\font-atlas-example\atlas-gen\target\debug\deps\libminiz_sys-d19b88f9ef21a81d.rlib(miniz.o): In function `tinfl_decompress':
    /cygdrive/c/Users/Chris/.cargo/registry/src/github.com-121aea75f9ef2ce2/miniz-sys-0.1.6/miniz.c:1707: undefined reference to `__assert_func'
    C:\Users\chris\font-atlas-example\atlas-gen\target\debug\deps\libminiz_sys-d19b88f9ef21a81d.rlib(miniz.o): In function `tdefl_start_dynamic_block':
    /cygdrive/c/Users/Chris/.cargo/registry/src/github.com-121aea75f9ef2ce2/miniz-sys-0.1.6/miniz.c:2024: undefined reference to `__assert_func'
    /cygdrive/c/Users/Chris/.cargo/registry/src/github.com-121aea75f9ef2ce2/miniz-sys-0.1.6/miniz.c:2026: undefined reference to `__assert_func'
    /cygdrive/c/Users/Chris/.cargo/registry/src/github.com-121aea75f9ef2ce2/miniz-sys-0.1.6/miniz.c:2027: undefined reference to `__assert_func'
    /cygdrive/c/Users/Chris/.cargo/registry/src/github.com-121aea75f9ef2ce2/miniz-sys-0.1.6/miniz.c:2030: undefined reference to `__assert_func'
    C:\Users\chris\font-atlas-example\atlas-gen\target\debug\deps\libminiz_sys-d19b88f9ef21a81d.rlib(miniz.o):/cygdrive/c/Users/Chris/.cargo/registry/src/github.com-121aea75f9ef2ce2/miniz-sys-0.1.6/miniz.c:2031: more undefined references to `__assert_func' follow
    
    $ gcc --version
    gcc (GCC) 4.9.2
    Copyright (C) 2014 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
    $ rustc --version
    rustc 1.5.0-nightly (168a23ebe 2015-10-01)
    
    $ cargo --version
    cargo 0.6.0-nightly (7f21e73 2015-10-01)
    
    opened by viperscape 22
  • Add a pure-Rust backend

    Add a pure-Rust backend

    flate2 gets its actual compression from either libz or miniz, both C libraries. Ultimately, a pure-Rust stack is better for Rust, mostly because of build simplicity.

    Write a miniz replacement in Rust, publish it to crates.io and add another compile-time feature to select it.

    Then make the performance better than miniz and make it the default.

    help wanted 
    opened by brson 21
  • Rename internal types to match the public types

    Rename internal types to match the public types

    The write/read/bufread modules all repeat the same type names:

    pub use gz::EncoderReader as flate2::read::GzEncoder;
    pub use deflate::EncoderReader as flate2::read::DeflateEncoder;
    

    Unfortunately the rustdoc for flate2::read::GzEncoder shows the private names:

    impl<R: Read> EncoderReader<R>
    fn new(r: R, level: Compression) -> EncoderReader<R>
    

    This is a rustdoc bug but even aside from that, this pattern is confusing to people browsing the code because what they see clicking through a [src] link does not match how they will be using the library. Let's try to make the real type names match the public names they are exported as.

    Relevant API guideline: https://github.com/brson/rust-api-guidelines/issues/5 Rustdoc bug: https://github.com/rust-lang/rust/issues/41072

    help wanted easy 
    opened by dtolnay 16
  • Decoder eats whole input stream

    Decoder eats whole input stream

    As explained to me in http://stackoverflow.com/a/28641354/506962

    However, it [ByRefReader] does not work when reading. It looks like reader::ZlibDecoder might consume all the way to the end of the underlying Reader. This could potentially be a bug or an oversight in the flate2 library.

    opened by jnvsor 15
  • Avoid quadratic complexity in GzDecoder

    Avoid quadratic complexity in GzDecoder

    Quadratic complexity happens when the underlying reader supplies bytes one at a time and would block. And if header flag FNAME is set and we never have a null byte to end the filename, read_gz_header keeps reading all of the partial filename and computing the CRC...

    The solution is to keep a more complex structure than a simple buffer for what has already been parsed in the header (as is done in C zlib)

    @alexcrichton I will put some comments in the code for your review

    opened by catenacyber 13
  • Partial file decompress support

    Partial file decompress support

    I'm working on an application that pulls parts of compressed files out of S3. I don't want to pull the entire file out of s3 due to file sizes. I should be able to pass part of the file to GzDecode and decompress just the chunk.

    let client = S3Client::new(Region::default());
    let req = GetObjectRequest {
        bucket: self.bucket.clone(),
        key: self.key.clone(),
        version_id: Some(self.version_id.clone()),
        part_number: Some(part),
        ..Default::default()
    };
    
    let response = client.get_object(req).await;
    if response.is_err() {
        let err = response.err().unwrap();
        error!("{}", err);
        panic!("Unable to fetch object from S3");
    }
    let response = response.unwrap();
    // More Code Here...
    
    let body = response.body.unwrap();
    let mut buff = BytesMut::with_capacity(512);
    match body.into_async_read().read_buf(&mut buff).await {
    // More Code Here...
    let frozen_bytes = buff.to_vec();
    let mut deflater = GzDecoder::new(&frozen_bytes[..]);
    let mut s = String::new();
    let read_response_length = deflater.read_to_string(&mut s);
    

    However, I get a corrupt deflate stream error. Is it not possible to pass only part of a gzip compressed file to the GzDecoder?

    opened by ryanvade 13
  • Disable compilation of miniz-sys on WASI

    Disable compilation of miniz-sys on WASI

    This aligns build script conditions with all the #[cfg(...)] conditions in that miniz-sys shouldn't be attempted to be compiled on WASI target.

    In particular, this previously caused library to fail to compile to wasm32-unknown-wasi target from a Windows host.

    opened by RReverser 10
  • Fix build in `wasm{32,64}-unknown-unknown` with `zlib` feature

    Fix build in `wasm{32,64}-unknown-unknown` with `zlib` feature

    error[E0432]: unresolved import `libc::c_int`
       --> src/mem.rs:316:13
        |
    316 |         use libc::c_int;
        |             ^^^^^^^^^^^ no `c_int` in the root
    
    error[E0432]: unresolved imports `libc::c_int`, `libc::c_uint`, `libc::c_void`, `libc::size_t`
      --> src/ffi/c.rs:10:16
       |
    10 | pub use libc::{c_int, c_uint, c_void, size_t};
       |                ^^^^^  ^^^^^^  ^^^^^^  ^^^^^^ no `size_t` in the root
       |                |      |       |
       |                |      |       no `c_void` in the root
       |                |      no `c_uint` in the root
       |                no `c_int` in the root
    
    error[E0432]: unresolved imports `libc::c_char`, `libc::c_int`
       --> src/ffi/c.rs:381:16
        |
    381 |     use libc::{c_char, c_int};
        |                ^^^^^^  ^^^^^ no `c_int` in the root
        |                |
        |                no `c_char` in the root
    
    opened by tbu- 9
  • Filename header missing and cannot read past the first couple lines of a gzip file

    Filename header missing and cannot read past the first couple lines of a gzip file

    I was working with a dump of wikipedia data: https://dumps.wikimedia.org/enwiki/latest/enwiki-latest-abstract.xml.gz (~760M) and found that flate2 could not read the file properly.

    When I would gunzip and then re-gzip the file (e.g. gunzip -c enwiki-latest-abstract.xml.gz | gzip > enwiki-latest-abstract.xml.gz) the Rust code would read the file properly.

    I'm really not sure what magic bytes flate2 might not be handling properly, as far as I can tell it's a well formed gzip file :shrug:

    My code looks something like this:

            use std::io::BufReader;
            let file = File::open(gzip_xml)?;
            let gz = GzDecoder::new(BufReader::new(file));
            println!("header: {:?}", gz.header());
            let mut reader = BufReader::new(gz);
            let mut line = String::new();
    
            use std::io::BufRead;
            let mut count = 0;
            loop {
                if count > 10 {
                    break;
                }
                count += 1;
                let mut line = String::new();
                let len = reader.read_line(&mut line)?;
                println!("{} - {}", len, line);
            }
    

    What I noticed was interesting is in the original downloaded file, the "header" that I printed had an empty filename field, the re-gzipped archive has that however. :confused:

    opened by rtyler 9
  • compile error

    compile error

    Suddenly got this error, seems related to the new release. Note that I'm not using this crate directly. Any ideas?

    Compiling flate2 v1.0.10 error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead? --> /home/rust/.cargo/registry/src/github.com-1ecc6299db9ec823/flate2-1.0.10/src/lib.rs:89:1 | 89 | extern crate libc; | ^^^^^^^^^^^^^^^^^^ | = note: for more information, see https://github.com/rust-lang/rust/issues/27812

    error[E0658]: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead? --> /home/rust/.cargo/registry/src/github.com-1ecc6299db9ec823/flate2-1.0.10/src/ffi.rs:52:20 | 52 | pub use libc::{c_int, c_uint, c_void, size_t}; | ^^^^^ | = note: for more information, see https://github.com/rust-lang/rust/issues/27812

    opened by sallyyu0 9
  • Fixed overflow bug in crc combine

    Fixed overflow bug in crc combine

    The combine function for the CRC hash can cause integer overflow if the amt variable is close to u32::MAX. To fix this I changed the regular add to wrapping add, the same way the update function works.

    opened by AntonJMLarsson 0
  • Add method to get current position for GzDecoder

    Add method to get current position for GzDecoder

    Greetings!

    It would be very nice to have a method to get the current position in compressed file: this way it's possible to calculate/display progress of file processing since we know the size of compressed file, not the uncompressed.

    This is what gzoffset does in zlib C library.

    opened by alexnivanov 0
  • Add CIFuzz Github action

    Add CIFuzz Github action

    Add CIFuzz workflow action to have fuzzers build and run on each PR.

    This is a service offered by OSS-Fuzz where flate2-rs already runs. CIFuzz can help detect regressions and catch fuzzing build issues early, and has a variety of features (see the URL above). In the current PR the fuzzers gets build on a pull request and will run for 300 seconds.

    opened by DavidKorczynski 2
  • Recommend MultiGzDecoder over GzDecoder in docs

    Recommend MultiGzDecoder over GzDecoder in docs

    Part of #178.

    I removed the text that says "the specification, however, allows ..." and the comment about bioinformatics because they make it sound like MultiGzDecoder is a rare thing that you should only enable if you need it, but it's actually the correct choice for almost all cases since it implements what the RFC considers a "gzip file."

    opened by jsha 0
  • Fix GzDecoder Write partial filenames and comments

    Fix GzDecoder Write partial filenames and comments

    If the gzip header contains an optional filename or comment but they are not completely contained in the buffer sent to a write::GzDecoder, then a valid header is created, missing data from these optional sections. A subsequent write call will treat the remaining header as encoded data and attempt to decode it, making the file appear to be corrupt.

    This change rewrites the header parsing code to handle partial headers correctly for both Read (where WouldBlock is handled specially) and Write (where UnexpectedEof is handled specially).

    The parsing code moves from bufread.rs to mod.rs to emphasize that it is also used by write.rs. write.rs no longer uses any symbols from bufread.rs.

    The only test in bufread.rs tested Buffer which is no longer needed, so it was removed. The support code in the bufread tests module was used by a test in mod.rs which tests a read::GzDecoder so the support code and the test move to read.rs.

    Fixes #320

    opened by jongiddy 1
Releases(1.0.25)
  • 1.0.25(Dec 23, 2022)

    What's Changed

    • Use SPDX license format and update links by @atouchet in https://github.com/rust-lang/flate2-rs/pull/296
    • Bump miniz_oxide to 0.6 by @paolobarbolini in https://github.com/rust-lang/flate2-rs/pull/317
    • Prep release 1.0.25 by @thomcc in https://github.com/rust-lang/flate2-rs/pull/327

    New Contributors

    • @atouchet made their first contribution in https://github.com/rust-lang/flate2-rs/pull/296
    • @paolobarbolini made their first contribution in https://github.com/rust-lang/flate2-rs/pull/317
    • @thomcc made their first contribution in https://github.com/rust-lang/flate2-rs/pull/327

    Full Changelog: https://github.com/rust-lang/flate2-rs/compare/1.0.24...1.0.25

    Source code(tar.gz)
    Source code(zip)
Owner
The Rust Programming Language
The Rust Programming Language
libbz2 (bzip2 compression) bindings for Rust

bzip2 Documentation A streaming compression/decompression library for rust with bindings to libbz2. # Cargo.toml [dependencies] bzip2 = "0.4" License

Alex Crichton 67 Dec 27, 2022
Snappy bindings for Rust

Snappy [ Originally forked from https://github.com/thestinger/rust-snappy ] Documentation Usage Add this to your Cargo.toml: [dependencies] snappy = "

Jeff Belgum 14 Jan 21, 2022
lzlib (lzip compression) bindings for Rust

lzip Documentation A streaming compression/decompression library for rust with bindings to lzlib. # Cargo.toml [dependencies] lzip = "0.1" License Lic

Firas Khalil Khana 8 Sep 20, 2022
Basic (and naïve) LZW and Huffman compression algorithms in Rust.

Naive implementation of the LZW and Huffman compression algorithms. To run, install the Rust toolchain. Cargo may be used to compile the source. Examp

Luiz Felipe Gonçalves 9 May 22, 2023
A utility that can download JavaScript and TypeScript module graphs and store them locally in a special zip file.

eszip A utility that can download JavaScript and TypeScript module graphs and store them locally in a special zip file. To create a new archive: > esz

Deno Land 162 Dec 24, 2022
A simple rust library to read and write Zip archives, which is also my pet project for learning Rust

rust-zip A simple rust library to read and write Zip archives, which is also my pet project for learning Rust. At the moment you can list the files in

Kang Seonghoon 2 Jan 5, 2022
A Brotli implementation in pure and safe Rust

Brotli-rs - Brotli decompression in pure, safe Rust Documentation Compression provides a <Read>-struct to wrap a Brotli-compressed stream. A consumer

Thomas Pickert 59 Oct 7, 2022
Brotli compressor and decompressor written in rust that optionally avoids the stdlib

rust-brotli What's new in 3.2 into_inner conversions for both Reader and Writer classes What's new in 3.0 A fully compatible FFI for drop-in compatibi

Dropbox 659 Dec 29, 2022
Like pigz, but rust - a cross platform, fast, compression and decompression tool.

?? crabz Like pigz, but rust. A cross platform, fast, compression and decompression tool. Synopsis This is currently a proof of concept CLI tool using

Seth 232 Jan 2, 2023
A Rust application that compress files and folders

Quick Storer This is a Rust application that compress files and folders. Usage Download or build the binary and place it on your desktop, or any other

AL68 & co. 1 Feb 2, 2022
SIMD Floating point and integer compressed vector library

compressed_vec Floating point and integer compressed vector library, SIMD-enabled for fast processing/iteration over compressed representations. This

Evan Chan 56 Nov 24, 2022
Lossless compressor and decompressor for numerical data using quantiles

This rust library compresses and decompresses sequences of numerical data very well. It currently supports the following data types: i32, i64, u32, u64, f32, f64. Smaller data types like i16 can be efficiently compressed by casting to i32. Timestamp support may come soon in the future.

Martin 163 Dec 14, 2022
Convenience library for reading and writing compressed files/streams

compress_io Convenience library for reading and writing compressed files/streams The aim of compress_io is to make it simple for an application to sup

Simon Heath 0 Dec 16, 2021
Obvious Unified Compression Helper is a CLI tool to help you compress and decompress files of several formats

Ouch! ouch stands for Obvious Unified Compression Helper and is a CLI tool to help you compress and decompress files of several formats. Features Usag

null 734 Dec 30, 2022
A Rust implementation of the Zopfli compression algorithm.

Zopfli in Rust This is a reimplementation of the Zopfli compression tool in Rust. I have totally ignored zopflipng. More info about why and how I did

Carol (Nichols || Goulding) 76 Oct 20, 2022
Tar file reading/writing for Rust

tar-rs Documentation A tar archive reading/writing library for Rust. # Cargo.toml [dependencies] tar = "0.4" Reading an archive extern crate tar; use

Alex Crichton 490 Dec 30, 2022
Zip implementation in Rust

zip-rs Documentation Info A zip library for rust which supports reading and writing of simple ZIP files. Supported compression formats: stored (i.e. n

null 549 Jan 4, 2023
Pure Rust bzip2 decoder

bzip2-rs Pure Rust 100% safe bzip2 decompressor. Features Default features: Rust >= 1.34.2 is supported rustc_1_37: bump MSRV to 1.37, enable more opt

Paolo Barbolini 36 Jan 6, 2023
Ribzip2 - A bzip2 implementation in pure Rust.

ribzip2 - a comprehensible bzip2 implementation ribzip2 is command line utility providing bzip2 compression and decompression written in pure Rust. It

null 16 Oct 24, 2022