3 ms·
I got similar results compressing data for a mixed memory/disk based cache (Ehcache) using Java's in-built GZIP compression. Can't believe it took me so long to
by pivo 14y ago
I got similar results compressing data for a mixed memory/disk based cache (Ehcache) using Java's in-built GZIP compression. Can't believe it took me so long to try this.
The cache values were in the 2-8K range and GZIP gave me about %90 compression. I also "compressed" the cache keys (which could be in 1-2K range) by using their MD5-sums instead of the actual key. The tiny chance of a collision was hugely outweighed by the memory savings.
- maxpert 14y agoI totally agree with MD5 strategy, but using it can be a bad idea for range scans if you are want to use them at all in future.