C Libraries

·        Integer Coding Library: This is a C library containing a set of useful coding routines for positive integers: Gamma coding, Delta coding, Golomb coding, Gamma-Golomb coding, Continuation Bit coding. The coding routines are included in the file integer_coding_lib.c, their prototypes in integer_coding_lib.h (together with some explanations). The files example1.c and example2.c show just two simple examples of use of the library.

Each coding routine exploits a Buffer data structure where the coding routines can write the coded integers one after the other. The library offers the possibility to intermingle the use of different coding routines (provided that we remember their sequence of application at decoding time). After the coding of a sequence of integers, the user should move the Buffer content into an array of uchar (possibly a mmapped file); as well, the bit sequence corresponding to the coding of a sequence of integers should be explicitly loaded by the user into aBuffer in order to be correctly decoded.      

Under the distributed gzipped-tarred file you find three dirs: LIB contains the final compiled library, SRC contains the source code and the Makefile to build the library, EXAMPLE contains two simple examples of use of the library.

To compile the examples please use:

> gcc example1.c -oexample1 -O3 ../lib/intCodingLib.a -lm 

The library is distributed under the LGPL license.


   For questions/comments please write me !