Hi,
Has anyone managed to use gzip compression/decompression in memory? By default gzip is file-based and I would think we could achieve a nice performance boost by eliminating hits to the file system.
I think this is the best resource I found so far: https://stackoverflow.com/questions/1838699/how-can-i-decompress-a-gzip-stream-with-zlib
Thanks!
It's built in:
For files you can read them into strings or blobs first, then compress...
Honestly though - I don't think all of that will save you much in terms of perf. If you have a fast SSD disk the file overhead for 16 megs or less that you can do in memory isn't going to give you a significant perf boost.
+++ Rick ---
Hi Rick,
Thanks for the quick reply and links.
Sorry, but those functions use the temp folder for compression/uncompression.
This function uses temporary files in the Temp folder to unzip the Zip data.
We have ~40 virtual machines using terabytes of storage. Although a portion of it is SSD, we can't count on that. Traffic between servers can easily be larger than 16 mb and more than 6,000 hits per hour during peak times, so every little bit helps.