-
Compress memory contents
I've found hundreds of solutions about compressing files on disk, but in my case I want to compress/decompress data placed in memory, without any loss.
For example, is there a way of compressing PropertyBag contents on the fly? The purpose is to transfer through winsock less bytes than the original (1MB of the data I am talking can be less than 40kb in zip).
-
Check out ZLIB. It can compress data in-memory. The homepage has DLLs you can download.
-
thanks
Thank you, great library and it needs only the zlib.dll. The rest of the code i put it outside the sample class in a standard module and now the two stand alone functions "compressdata" and "decompressdata" are more flexible. Many thanks to the author, the compressing ratio is very high, a bitmap byte array about 3mb turned to be only 20kb.
-