Gerald R. Tamayo's repositories
LZW-Algorithm
C implementations of the Lempel-Ziv-Welch (LZW) algorithm. Lzwg features optional bitsize (default=16) of dictionary string table size (default=65536). Lzwhc is a single file codec, via faster hashing. Note: lzwg uses maximum 1.7GB+ RAM and lzwhc uses maximum 2.4GB+ RAM @ 28-bit dictionary!
Algorithm-FGK
D. Knuth's adaptive or dynamic Huffman Coding named Algorithm FGK.
Algorithm-Vitter
Dynamic Huffman Coding II: Vitter's algorithm, also known as "Algorithm V". Vitc.c and vitd.c implement Vitter's algorithm. Vitz.c shows how you can have more than one "huffmodel" in one program. Vittz and vittzd use the simple functions encode_symbolVITTER() and decode_symbolVITTER() to encode and decode bytes respectively.
BWT
Sample code for the Burrows-Wheeler Transform (BWT).
Huffman-Coding
Sample program for static Huffman Coding.
lzhc
Lzhh rehashed without adaptive Huffman to output compression codes of lzuf2. Compiled with 128KB window. Uses an EOF_CODE, works on enwik10. :P
lzuf62
Lzuf62 works on bigger files > 4GB like enwik10. Optional bitsize for sliding window implemented, WBITS = 12..20, default=17. Lzuf621 with optional bitsize of hash bucket search list (far_list_bits = 1..12), default=9. Lzuf622 and lzuf624 single file coder/decoder.
Move-To-Front
Simple file compressor using the MTF algorithm (2021). Your first data compressors (VLC + MTF), mtfc2 and mtfc3. :)
lzuf22
Corrected the decoding algorithm of lzuf2, actually using a previous simple working decoding algorithm. Note: ZIP is still better than lzuf22. :P
lzuf55
Lzuf55 starts with a small sliding window size to limit offset bitsize, but compression is not better than lzuf22. So in LZ77, big window size is king.
PRAQ
Sample code for LZ Prediction (LZP) algorithms.
praq4
This is a modification of praq3 from 2010 without using the ftell() function.
praq52
"PPP mode" now writes mismatched bytes as true raw bytes like in ppp compressor. Output is more compact than ppp and lzp2. As fast as ppp.
praq6
Essentially praq52 but using Golomb codes instead of the put_vlcode() function.
praq716
With lzpgt, these are what should have been the earliest versions of praq. Versions of transmitting LZP match_len and/or mismatched_len not just 1 bit per matched byte or mismatched byte. Actually less compression on mismatched_len.
Shannon-Fano-Coding
Sample code for Shannon Coding. Precursor to Huffman Coding?