Skip to content

Tag: zlib

Use zlib.js to decompress python zlib compress

On the server side I use python zlib to compress a string as follows: The result of the previous code is the following On the client side I use zlib.js to decompress I get the following error what am I doing wrong? Answer The problem was coding. in python I used base64 to encode. On the client side: Thank you

Python zipfile, How to set the compression level?

Python supports zipping files when zlib is available, ZIP_DEFLATE see: https://docs.python.org/3.4/library/zipfile.html The zip command-line program on Linux supports -1 fastest, -9 best. Is there a way to set the compression level of a zip file created in Python’s zipfile module? Answer Starting from p…