LZ77: trying to understand hash tables...other ideas?

1 post / 0 new
Offline
Last seen: 20 hours 11 min ago
Joined: Nov 12 2022 - 16:50
Posts: 210
LZ77: trying to understand hash tables...other ideas?

Hi!  I'm trying to understand hash tables.  From what I understand, every time I process a string of data, look for the first four bytes in a hash table.  If a match is found, scan starting there for a better match.  If only the first two or three match, scan to there, as I do better on smaller offsets.  If the match is at least four bytes, add it to the hash table.  I thought of a derivative: keep an 8k array of bits, where each bit determines if an associated word was used.  If a word in the input was not already encountered, skip the LZ77 scan. I think I was doing this wrong, as it didn't help in speed much and hurt the compression ratio.  :(  I am looking for other ideas.