Git Product home page Git Product logo

zip-rs's Introduction

zip-rs

Build Status Crates.io version Discord

Documentation

Info

A zip library for rust which supports reading and writing of simple ZIP files.

Supported compression formats:

  • stored (i.e. none)
  • deflate
  • bzip2
  • zstd

Currently unsupported zip extensions:

  • Encryption
  • Multi-disk

Usage

With all default features:

[dependencies]
zip = "0.6"

Without the default features:

[dependencies]
zip = { version = "0.6.6", default-features = false }

The features available are:

  • aes-crypto: Enables decryption of files which were encrypted with AES. Supports AE-1 and AE-2 methods.
  • deflate: Enables the deflate compression algorithm, which is the default for zip files.
  • bzip2: Enables the BZip2 compression algorithm.
  • time: Enables features using the time crate.
  • zstd: Enables the Zstandard compression algorithm.

All of these are enabled by default.

MSRV

Our current Minimum Supported Rust Version is 1.59.0. When adding features, we will follow these guidelines:

  • We will always support the latest four minor Rust versions. This gives you a 6 month window to upgrade your compiler.
  • Any change to the MSRV will be accompanied with a minor version bump
    • While the crate is pre-1.0, this will be a change to the PATCH version.

Examples

See the examples directory for:

  • How to write a file to a zip.
  • How to write a directory of files to a zip (using walkdir).
  • How to extract a zip file.
  • How to extract a single file from a zip.
  • How to read a zip from the standard input.

Fuzzing

Fuzzing support is through cargo fuzz. To install cargo fuzz:

cargo install cargo-fuzz

To list fuzz targets:

cargo +nightly fuzz list

To start fuzzing zip extraction:

cargo +nightly fuzz run fuzz_read

zip-rs's People

Contributors

mvdnes avatar plecra avatar zamazan4ik avatar lireer avatar kauhat avatar pyguy2 avatar rylev avatar nobodyxu avatar n3vu0r avatar aquacash5 avatar jonpas avatar xmclark avatar striezel avatar mbr avatar srijs avatar zacps avatar nickbabcock avatar contextualist avatar camchenry avatar biluohc avatar pkgw avatar fujiapple852 avatar davide-romanini avatar a1phyr avatar aweinstock314 avatar anti-social avatar alexbool avatar dependabot-preview[bot] avatar dr-emann avatar notmandatory 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.