phafre uses sixpack's routine. it's similar to huffman coding.
Code:To compress phafre c[#1,#2,#3,#4] infile outfile #1 0..3 context order. default is 2 #2 0..15 increment of symbol frequency #3 0..255 max frequency count(# x 30) #4 0..4000 max memsize. #+1 MBytes. default is 1000 if those are empty or not number, gives auto value. Example for compress phafre c in out phafre c2,4,30 in out phafre c1,a,a,100 in out phafre c,,,200 in out To decompress: phafre d infile outfile