Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gzip In-Memory Compression

Quick and simple question.

There are examples online about achieving in-memory gzip compression with zlib (C++) WITHOUT external libraries (like boost or such)?

I just need to compress and decompress a block of data without much options. (it must be gzip as its the same format used by another mine C# program (the data is to be shared))

Tried to search to no avail... Thanks!

like image 798
feal87 Avatar asked Jul 22 '26 00:07

feal87


1 Answers

You use an external library called zlib. You could statically link against this library if you did not want to bundle the DLL with your program.

zlib works happily with in-memory buffers.

You do not require boost.

like image 51
Will Avatar answered Jul 23 '26 14:07

Will



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!