from tornado 0.3:
LZ77_Coder.cpp:
uint extra_dbits[32] = {4,4,5,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13 ,14,14,15,15,16,17,18,19,21,23,30};
from lzturbo asm as provided by raymond::
L0044B640:
db 04h;
db 04h;
db 05h;
db 05h;
db 05h;
db 06h;
db 06h;
db 07h;
db 07h;
db 08h;
db 08h;
db 09h;
db 09h;
db 0Ah;
db 0Ah;
db 0Bh;
db 0Bh;
db 0Ch;
db 0Ch;
db 0Dh;
db 0Dh;
db 0Eh;
db 0Eh;
db 0Fh;
db 0Fh;
db 10h;
db 11h;
db 12h;
db 13h;
db 14h;
db 16h;
db 18h;
the code look surprisingly similar, but also note:
- the last 3 bytes are different
- tornado uses int vs. lzturbo uses char as datatype
- this buffer is nothing else than a representation of the lz77 deflate 64 distance tree... but all implementations i found start with value 0 not 4... so whatever source or paper both authors based their tree on, i guess its the same and would like to know which one.
tired and lazy i give up...
bulat: please can you tell me why the buffer starts with value 4?

Reply With Quote
