Skip to content

This repository contains files related to the project Arithmetic Coding done as a part of the course COMP9319-Web Data Compression and Search

Notifications You must be signed in to change notification settings

anantkm/ArithmeticCoding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arithmetic Coding

This is a command-line program that implements arithmetic coding for lossless data compression. The program consists of two parts: aencode and adecode.

Getting Started

To use this program, follow these steps:

  1. Clone the repository onto your local machine.
  2. Compile the program using the provided makefile.
  3. Run the aencode program with the input file as an argument. This will generate a compressed output file.
  4. Run the adecode program with the compressed file as an argument. This will decode the compressed file and generate the original input file.

Program Details

aencode

The aencode program takes an input file and generates a compressed output file. It uses arithmetic coding to compress the data. The program calculates the probability and range values for each character in the input string and builds a look-up table for encoding. The compressed data is output to a file, along with the precision required to decode the data.

adecode

The adecode program takes a compressed file and generates the original input file. It uses arithmetic decoding to decode the compressed data. The program reads the compressed data and the precision from the input file, and builds a look-up table for decoding. It then decodes the compressed data and outputs the original input file.

Dependencies

This program requires the mpfr and gmp libraries to be installed on your machine.

Usage

aencode

./aencode [input file]

adecode

./adecode [compressed file]

Author

This program was written by Anant Mahale.

About

This repository contains files related to the project Arithmetic Coding done as a part of the course COMP9319-Web Data Compression and Search

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published