Context algorithm
Semi-predictive context algorithm implementation
|
In this page you will find information about our semi-predictive context algorithm implementation. The source code and documentation can be browsed from this page and can also be cloned from this github repository.
Also the source code for this algorithm can be downloaded here.
The included Makefile can be used to compile the project in a GNU environment. This file creates two executable files: context and context.opt. The first one is the debug version and the second is the optimized version. The debug version defines the DEBUG
preprocessor variable. The mode variable in the Makefile determines if a 64 bit or 32 bit version of the binary is produced.
In addition to those files, two links to them are created called uncontext and uncontext.opt. These can be used to decompress files without the needing to specify any command line options.
The GSL library is needed for compilation. It must be located in any of the default library directories. If this is not so the appropriate environment variables should be adjusted (i.e. LD_LIBRARY_PATH
, etc.)
This makefile can also be used to generate the program documentation and this web page. To do so the command make doc
must be executed. For it to work the the doxygen documentation utility must be installed in the system.
To clean the object code files created during compilation make clean
must be executed. Furthermore the make doc-clean
command deletes all the generated documentation.
The included Makefile can be used to compile the project in Windows using gcc if the variable os
is set to windows. Cygwin is needed for this to work.
context [options] input_file [output_file]
uncontext [options] input_file [output_file]
Options:
Options for compression only:
When the file is invoked as context compression is the default action. When invoked as uncontext decompression is the default.
The default output_file for compression is input_file.ctx. When decompressing the default output file is the input file with the extension removed. If the input file does not have an extension the default output file wil be input_file.out
The -k and -u options select the algorithm that will be used to build the context tree of the input string.
The arithmetic directory contains the arithemtic encoder/decoder source code as taken from this article
Precompiled binary files: