Skip to content

MichaelDipperstein/arcode-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:
https://michaeldipperstein.github.io/arithmetic.html
http://www.datacompression.info/ArithmeticCoding.shtml

FILES
-----
__init__.py     - Python package initializtion code for acode
arcode.py       - File containg a Class implementing the arithmetic
                  encoding and decoding algorithms.
COPYING         - GNU General Public License v3
README          - This file
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 GitHub repository:
https://github.com/MichaelDipperstein/bitfile-py.git

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
07/30/17 - Add support for python 3.x

TODO
----
- Add/Verify support for file-like objects.

AUTHOR
------
Michael Dipperstein (mdipperstein@gmail.com)

About

arcode-py: A python 2.7.x and 3.x implementation of arithmetic encoding and decoding

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages