This small extension wraps zlib to offer simple compression/decompression functions for GameMaker: Studio (1, 2) games.
Note: In current versions of GameMaker Studio 2 you can use built-in functions buffer_compress and buffer_decompress for the same purpose.
It allows to deflate/inflate sections of buffers, including support for compression levels and error handling.
A manual is available online.
Source code is available at BitBucket.
Version 1.0.0. Published May 17, 2017
Created with GameMaker: Studio v7.7.1458
You can only review assets you've bought.
Easy to use, and the compressed buffers are compatible with GMS2's buffer_decompress, which was the main thing I needed.
There seems to be an error in buffer_inflate, though, around line 82 in buffer_zlib.gml where it would complain that l_avail isn't defined.I appear to have fixed it by just initializing it to zero where it's declared on line 69 and after that it works - compressed and decompressed buffers are identical to the originals, etc. I didn't pick through the code, so I don't know if that was just a special case or if it will always complain about that, though.
Perfect! Thank you