Zlib Inflate / Deflate

Do Zlib compression and decompression in C land.

Defalte(string, level) : data
Inflate(data) : string

Example

Compress a string using the highest compression level.

local input = ('This will be my long string.'):rep(10000)
local compressed = Defalte(input, 9)
local decompressed = Inflate(compressed)
print(decompressed == input and "Success!" or "Failure!")