-
Notifications
You must be signed in to change notification settings - Fork 18
Description
Hi,
I am trying to make/find a python module to interoperate with your LibDeflate implementation.
I've tried using python 3.11 stdlib zlib library with no success.
I tried the following snippet in python to generate a compressed file:
import zlib
import os
test_str = b'aaaa'
compressed = zlib.compress(test_str, wbits=-9)
with open('test_py.z', 'wb') as f:
f.write(compressed)And then tried to decompress it with lua .\LibDeflate.lua -d test_py.z test_py.txt, but only got the error:
LibDeflate: Decompress fails.
If I change the test_str to b'aa' I indeed get Successfully writes 2 bytes, so far that's all I have managed.
I also tried twiddling around with the wbits parameter from https://docs.python.org/3/library/zlib.html#zlib.compress but neither 9, -9, 25 nor leaving it out made any difference.
I also tried using LibDeflate:DecompressDeflate() but so far I have again only been able to transfer the string 'aa' and nothing else.
Would you be able to point me in the right direction?