www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - D1: zlib string to decode

reply jicman <jicman barrioinvi.net> writes:
Hi.

I have a zlib string that I want to decode.  Anybody has any idea 
how to do that?  I am trying to figure out what to send with a 
POST to create a new internal log and the person that created the 
form is no longer available, but I need to find what are the 
pieces and data that I need to compress.  Thanks for your help.

josé
Sep 08 2016
parent Era Scarecrow <rtcvb32 yahoo.com> writes:
On Thursday, 8 September 2016 at 16:19:44 UTC, jicman wrote:
 I have a zlib string that I want to decode.  Anybody has any 
 idea how to do that?  I am trying to figure out what to send 
 with a POST to create a new internal log and the person that 
 created the form is no longer available, but I need to find 
 what are the pieces and data that I need to compress.
I've done something similar years ago using AHK, where I compressed using zlib, then turned it to base64 so I could post it and pass it around as text. Still simply using the zlib API should be enough, especially if you provide all the memory management or fixed buffers of what you expect the data to fit in. If you just need to decompress one string (that's a file or stream), you can prepend a header and then use gzip to decompress it.
Sep 08 2016