All Questions
30
questions
0
votes
1
answer
195
views
How to decompress IDAT compressed data
i wrote some python code to extract each chunk of a PNG image , i've tried with 3 different images and it works perfectly , it also matches perfectly what's displayed in https://rameshvarun.github.io/...
0
votes
3
answers
270
views
Maximum size of compressed data using Python's zlib
I'm writing a Python library that makes ZIP files in a streaming way. If the uncompressed or compressed data of a member of the zip is 4GiB or bigger, then it has to use a particular extension to the ...
3
votes
1
answer
254
views
zlib difference in size for level=0 between Python 3.9 and 3.10
In this code that uses zlib to encode some data, but with level=0 so it's not actually compressed:
import zlib
print('zlib.ZLIB_VERSION', zlib.ZLIB_VERSION)
total = 0
print('Total 1', total)
...
0
votes
2
answers
295
views
Test that a ZIP doesn't require zip64 support
I'm looking to test some Python code makes zip files that dynamically chooses zip32 or zip64, and I would like to assert that in certain cases it really does create valid zip32 files by opening it in ...
1
vote
1
answer
79
views
Difference between two zlib data ( same value )
I am working with zlib data from 3 days and I cannot get out of this problem:
The original zlib compressed data hex is as follows: ...
0
votes
2
answers
538
views
Original ZIP size limits 2^32 vs 2^32 - 1. Is there an off by 1 error in Wikipedia?
According to https://en.wikipedia.org/wiki/ZIP_(file_format)#ZIP64
The original .ZIP format had a 4 GB (2^32 bytes) limit on various things (uncompressed size of a file, compressed size of a file, ...
0
votes
1
answer
114
views
DEFLATE discrepancy?
So I'm trying to create a python script to generate a level for a game made in MMF2+Lua, and I've run into something I can't figure out how to fix.
Generating a 16x16 empty level with borders with the ...
1
vote
1
answer
353
views
How to get zlib (or another library) to create Type 01 DEFLATE block
I'm writing a DEFLATE uncompressor (in Python), and wanting to test it with Type 01 blocks (i.e. with the fixed Huffman code in of 3.2.6. of RFC 1951.
I know I can create them myself, but I would like ...
0
votes
1
answer
699
views
ZIP's CRC-32 for encryption isn't quite zlib's crc32... why?
I'm writing my own unzip code, and (from trial and error, no understanding) it looks like the CRC-32 algorithm on the one byte that decryption requires doesn't quite match up with zlib's. To convert ...
0
votes
1
answer
110
views
Possible to have a password-protected/weak-encrypted ZIP file with a data descriptor?
Is it possible to have ZIP file that has a data descriptor, and so the compressed size of each file is after its data, and have it password-protected via ZIP's "weak" encryption mechanism?
...
1
vote
1
answer
429
views
How do I decompress a MSZIP block?
I have a compressed file that is a CAB that I wish to extract a file from in Linux. Since there aren't any native CAB extractors on Linux, I figured I'd try my hand at getting one done.
While I've ...
4
votes
2
answers
1k
views
Using a preset deflate dictionary to reduce compressed archive file size
I have a requirement where text files are send from one location to other. Both location are in our control. The nature of content and the words that could appear in this are mostly the same. Which ...
2
votes
2
answers
563
views
ZIP files in the wild that don't use DEFLATE?
I'm making a (streaming) unZIP function in Python. ZIP files can use a range of compression algorithms, but the most common is DEFLATE according to https://en.wikipedia.org/wiki/ZIP_(file_format)
Are ...
0
votes
1
answer
437
views
Detect end of Deflate stream in Python
When reading a stream of bytes that contains a Deflate stream, is it possible to detect where the Delfate stream ends? If so: how? (Ideally in Python).
I see Decompress.unused_data, that looks like it ...
1
vote
1
answer
555
views
How to make Content-Encoding: deflate readable?
I'm creating a Python script to send alerts when a remote server's metrics are high. The server is using the Glances library running in webserver mode and my local machine is sending requests to the ...