Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Wrapper around zlib with custom header crc32.

Project description

.. image::
.. image:: :target:

A very small library for building crc32 header on top of zlib (in 2.7 standard library). Was built to learn pip packaging, and implement compression before encryption for EmPyre

To get up and running:

>>> from zlib_wrapper import compress
>>> from zlib_wrapper import decompress

zlib_wrapper compression step-by-step

To get you crc32 for supplied data or string:

>>> data = "Killswitc-gui is a sick handle"
>>> c = compress.compress()
>>> start_crc32 = ac.crc32_data(data)

To get your compressed for suplied data or string:

>>> comp_data = a.comp_data(data)

To build your custom zlib header with crc32:

>>> final_comp_data = a.build_header(comp_data, start_crc32)

zlib_wrapper decompression step-by-step

Decompression goes through crc32 checks and returns a custom dictonary object.

To decompress your compressed data:

>>> dec_data = b.dec_data(final_comp_data)
{'data': 'Killswitc-gui is a sick handle', 'header_crc32': 2727504892, 'crc32_check': True, 'dec_crc32': 2727504892}

Project details

Download files

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

Files for zlib_wrapper, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size zlib_wrapper-0.1.3.tar.gz (3.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page