Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce per-packet computation overhead for LZS compression
Since there is no history preserved from one packet to the next, we don't actually keep a real history. We just use the packet data instead. However, we can *pretend* we do, and pretend that we keep a full 32 bits (4GiB) of it. The current packet data represents just the latest part of it, and we should never be looking at anything older anyway. By using 32 bits for the hash offsets, and starting each new packet sufficiently far from the previous packet that it cannot 'see' history that it shouldn't, we can avoid having to clear the entire hash table data structure for each packet. The data structures are now twice as big, but only cleared once in every 65536 packets. Be a lot more paranoid about the contents of the hash tables now that they are more long-lived, to prevent problems caused by corruption. Now the worst that should happen is you waste some time looking for matches where there are none, even if you inherit complete crap in the data structures. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
- Loading branch information
David Woodhouse
authored and
David Woodhouse
committed
Jan 7, 2015
1 parent
a99260d
commit 6915682
Showing
6 changed files
with
85 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters