Skip to main content

A module providing arithmetic coding to compress/decompress files.

Project description

Description

This archive contains a python package that includes a class implementing arithmetic coding and decoding. This implementation is not intended to be the best, fastest, smallest, or any other performance related adjective.

More information on Arithmetic encoding may be found at: http://michael.dipperstein.com/arithmetic http://www.datacompression.info/ArithmeticCoding.shtml

License

ArithmeticCode is licensed under the GNU General Public License v3. See COPYING for full license text.

Files

__init__.py     - Python package initializtion code for bitfile.
arcode.py       - File containing a Class implementing the arithmetic encoding and decoding algorithms.
COPYING         - GNU General Public License v3
README          - Package documentation
sample.py       - Sample usage.
setup.py        - distutils setup file.

Installing

This package is dependent on the BitFile package. A current version may be obtained from the Python Package Index (http://pypi.python.org/) or http://michael.dipperstein.com/bitlibs/

Install the BitFile package prior to installing this package.

This package uses distutils. The package may be installed with the following command:

python setup.py install

Usage

arcode.py is fully documented with docstrings. Use your favorite tool for generating documentation from docstrings.

arcode.py also contains a simple unit test, which may be performed when the package is executed with the following command: python arcode.py

sample.py demonstrates usage of the ArithmaticCode methods for encoding and decoding files.

The following commands will encode a file: import arcode:

ar = arcode.ArithmeticCode(use_static_model)
ar.encode_file(input_file, output_file)

Where input_file and output_file are the names of the file to be encoded and file that will contain the results of the encoding.

The following commands will decode a file: import arcode:

ar = arcode.ArithmeticCode(use_static_model)
ar.decode_file(input_file, output_file)

Where input_file and output_file are the names of the file to be decoded and file that will contain the results of the decoding.

History

08/06/10 - Initial release

ToDo

  • Add/Verify support for Python 3.x.

  • Add/Verify support for file-like objects.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distributions

arcode-0.1.zip (26.9 kB view details)

Uploaded Source

arcode-0.1.tar.gz (22.7 kB view details)

Uploaded Source

File details

Details for the file arcode-0.1.zip.

File metadata

  • Download URL: arcode-0.1.zip
  • Upload date:
  • Size: 26.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for arcode-0.1.zip
Algorithm Hash digest
SHA256 97f4a39b33627d51211c73db6775dbff3e8bdb261c4ddb1aefa031c7186fc082
MD5 45482f3cac36845668ab2fe98d25bce1
BLAKE2b-256 a70566b6a3eef438a8a9faa33df87d4e7ed9cc72c58f3feaa8ac04857584c483

See more details on using hashes here.

File details

Details for the file arcode-0.1.tar.gz.

File metadata

  • Download URL: arcode-0.1.tar.gz
  • Upload date:
  • Size: 22.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for arcode-0.1.tar.gz
Algorithm Hash digest
SHA256 218f02f118855e11c20b3731b7e117a21f5aa853284c3627755fecfcb319bcfb
MD5 bcf81acc373ac2e63877c192c6884991
BLAKE2b-256 a260e4694376eec307484a80bb9b1d2ba9a40823f9605ba3174c0077d132d0d9

See more details on using hashes here.

Supported by

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