For general infos about huffman coding see
http://en.wikipedia.org/wiki/Huffman_coding
fifo is a first-in-first-out buffer.
http://www.zwischenwelt.org/trac/iris/b ... ib.net.lua
in function NetTrafficStep ()
gMainConnection:Pop(gCompressedRecvFifo)
HuffmanDecompress(gCompressedRecvFifo,gRecvFifo)
http://www.zwischenwelt.org/trac/iris/b ... uffman.cpp
in void HuffmanDecompress (cFIFO *pInFifo, cFIFO *pOutFifo) {
contains the huffman decoding.
there is no gzip usage because we implemented the huffman our self. im not sure but i think its based on the old iris code which is based on runuo or something.
the decompressor dont know the size of the packet. it just gets a stream of compressed data and tries to decompress element by element.
while (HuffmanDecompressOne(pInFifo,pOutFifo)) ;
this way every complete huffman code gets decompressed and moved into a new fifo. if there is half a code the decompressor stops and leaves the fifo untouched.
every frame we insert the new recieved compressed data into the fifo and try again to decode. do we get a decompressed
fifo of recieved network packets that we can parse.