Skip to main content

Didactical python package implementing Golomb coding and decoding.

Project description

Travis CI build SonarCloud Quality SonarCloud Maintainability Codacy Maintainability Maintainability Pypi project Pypi total project downloads

Python package implementing Golomb coding.

How do I install this package?

As usual, just download it using pip:

pip install golomb_coding

Tests Coverage

Since some software handling coverages sometime get slightly different results, here’s three of them:

Coveralls Coverage SonarCloud Coverage Code Climate Coverate

Usage examples

The coding available from this package are golomb_coding, bernoulli_golomb_coding and optimal_golomb_coding. The following examples are usages of Golomb coding.

from golomb_coding import golomb_coding

golomb_coding(0, 3) # 10
golomb_coding(1, 3) # 110
golomb_coding(2, 3) # 111
golomb_coding(3, 3) # 010
golomb_coding(4, 3) # 0110
golomb_coding(5, 3) # 0111
golomb_coding(6, 3) # 0010
golomb_coding(7, 3) # 00110
golomb_coding(8, 3) # 00111
golomb_coding(9, 3) # 00010
golomb_coding(10, 3) # 000110
golomb_coding(11, 3) # 000111
golomb_coding(12, 3) # 000010
golomb_coding(13, 3) # 0000110
golomb_coding(14, 3) # 0000111
golomb_coding(15, 3) # 0000010

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

golomb_coding-1.0.6.tar.gz (3.5 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page