This is close to what I'm doing in zip 1.9. Restructuring the code to build a general purpose compression library is on my list of things to do. Perhaps there is a better way of encoding the Actually buffer size is the most major factor. Making in 300k doesn't improve it on 200k. That is less interesting.
Most time is soend looking for matches.
The digital trie is nice from a theoretic viewpoint but useless in practice. The overhead is too high. Simply brute force searching with hashing to speed it up is sufficient. Look at the ZIP 1.9 source to see excactly what I mean. It is the best.