Zlib Compression

Startbeitrag von JP am 20.03.2013 19:33

Hello All,

I need to retrieve a data packet from a web server which returns the data compressed using ZLIB.DLL. Is there a way to use ZLIB compression inside WinDev? In Visual FoxPro I can access the compress() and uncompres() functions in the ZLIB DLL by declaring the API calls as follows:

DECLARE INTEGER compress2 IN zlib.dll STRING @DEST , INTEGER @DestLen , STRING @SOURCE , INTEGER SourceLen , INTEGER CompressionLevel


The "@" symbol indicates the variable is passed by reference rather than by value.

Can I do a similar thing in WinDev?




if I remember correctly (used it in a project about 8 years ago), ZLib is following the zip standard quite closely... And if I'm right, it means that you can unzip your file using the built in windev zip functions...

If I'm wrong, you can easily call DLL functions using the API function

Best regards

von Fabrice Harari - am 20.03.2013 19:44
Hi Fabrice,

Thanks for the feedback. Indeed the ZLIB does seem to follow the zip standard (one of the ZLIB developers was an original developer of ZIP) but the WinDev ZIP functions work on disk files only, not on strings - is that correct? If so, I shall have to look at using the API() function as suggested - reading the help on that now.

Thanks again.

von JP - am 20.03.2013 19:52
Hello JP,

You can store the string in a temporary file on disk and then unzip it using WD functions.

von Frans - am 21.03.2013 11:50
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.