Skip to main content

All in one data compression library.

Project description

https://travis-ci.org/MacHu-GWU/compress-project.svg?branch=master https://codecov.io/gh/MacHu-GWU/compress-project/branch/master/graph/badge.svg https://img.shields.io/pypi/v/compress.svg https://img.shields.io/pypi/l/compress.svg https://img.shields.io/pypi/pyversions/compress.svg https://img.shields.io/badge/Star_Me_on_GitHub!--None.svg?style=social

Welcome to compress Documentation

There’s lots of mature data compression algorithm you can choose from, compress provides normalized API to use them and switch between them.

It supports:

  • zlib.

  • bz2.

  • lzma, high compression ratio but slow (it’s part of standard library after Python3.4, you can use backports.lzma for versions before that.)

  • pylzma, another implementation, faster in decompression than lzma.

  • snappy, from Google, lower compression ratio but super fast!

  • lz4, lower ratio, super fast!

Usage:

>>> from compress import Compressor
>>> c = Compressor()
>>> c.use_zlib() # or use_bz2, use_lzma, use_lz4, use_snappy
>>> c.compress(binary_data, zlib_level=9)
>>> c.decompress(binary_data)

This website provides comprehensive comparison and visualization. But how do you know how it works on your own production environment?.

compress comes with a tool to run benchmark test for All test case, All algorithm, All parameters, and you will get informative stats about ratio, compress/decompress speed in .tab and ascii table format. Then You are able to visualize it in the way you preferred.

To run benchmark test, just:

make up
make benchmark

If you use Windows (doesn’t have make command), this is the SOLUTION

Of course, you can extend with your own test case (How to extend test case).

Install

compress is released on PyPI, so all you need is:

$ pip install compress

To upgrade to latest version:

$ pip install --upgrade compress

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

compress-0.0.2.tar.gz (25.3 kB view details)

Uploaded Source

Built Distribution

compress-0.0.2-py2-none-any.whl (46.6 kB view details)

Uploaded Python 2

File details

Details for the file compress-0.0.2.tar.gz.

File metadata

  • Download URL: compress-0.0.2.tar.gz
  • Upload date:
  • Size: 25.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for compress-0.0.2.tar.gz
Algorithm Hash digest
SHA256 95d68985b8c0e3e0bb794f60e7b6be5af048355aba0eaea4b613f651d4d4ed40
MD5 be08655e97645aa663bd345d237f6598
BLAKE2b-256 c46374d1ab91e52f34c31c142cb0098d34107671434d2453af83ad0940d2466d

See more details on using hashes here.

File details

Details for the file compress-0.0.2-py2-none-any.whl.

File metadata

File hashes

Hashes for compress-0.0.2-py2-none-any.whl
Algorithm Hash digest
SHA256 04bbfa76cc1f0e33ae5de76145a2933208e95cb7d5ccd2e60287afd169030943
MD5 e9479d93278501afedae04cd5721e2b8
BLAKE2b-256 b1de6b765ea415f156828e4033ee76c0825d9f14f5b07ad59567602f6750c504

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page