Questions tagged [deflate]
deflate is a lossless data compression format, and also refers to implementations that compress to the deflate format. The deflate format was created by Phil Katz of PKWare for the PKZip (.zip) archive format. Public domain software provides deflate and inflate functionality in the gzip utility and the zlib library.
deflate
604
questions
0
votes
1
answer
28
views
how to correctly decode data when bits are read from right to left?
I have had my fair share of understanding compression so with major discoveries that i will later post on github but i am still unable to manually decode few byte sequence accordingly.
here is the ...
0
votes
1
answer
63
views
Storing NTFS File Attributes in a Zip Archive
I have recently written a DEFLATE compressor and decompressor. As far as I understand the fstream Windows gives you does not include NTFS attributes as these are found in the $MFT. I need to go over ...
-1
votes
1
answer
95
views
how to decompress the DEFLATE compressed data
I wanted to create the internet trend BadApple in c++ console. By extracting every frame from the BadApple video using ffmpeg in .png format and reading RGB pixel data from it. I already have a boiler ...
0
votes
0
answers
54
views
zlib inflate failing with errors like invalid distance too far back/ invalid block type/ invalid stored block lengths
Background: I am trying to deflate an in-memory buffer into a file and inflate it later for debugging.
In this case when the logs are flowing at a faster rate (about every millisecond) I see failures ...
0
votes
1
answer
34
views
Time complexity of optimal DEFLATE compression
The DEFLATE algorithm is specified in RFC 1951. However, the encoder can choose freely whether to insert a literal byte, or a sub-match from output buffer for each input byte. Assuming that everything ...
0
votes
1
answer
58
views
Deflated file is larger than original and still valid
Inside a zip, I found this deflated file. It's around 1MB, but when inflated (pako.inflateRaw), the original is just 50kb. How is this possible? What happens to the rest of the data when inflated? I'...
1
vote
1
answer
59
views
Why do i get more 256 false positive in PKZIP Decryption key verification?
I have been trying to brute force Key2 of ZipCrypto with first byte of CRC and last byte of encryption header to see how long would it take but i got more than 2000 valid keys.
From the APPNOTE, Key2 ...
1
vote
1
answer
52
views
How to decompress the contents of a var to another var?
I'm trying to uncompress what's inside of a var into the same var or onto another.
I created a .gz file using gzip -k filename. It generated a filename.gz while keeping the original. I uploaded this ...
0
votes
1
answer
45
views
What is the actual structure of a dynamic huffman block?
According to RFC1951:
3.2.7. Compression with dynamic Huffman codes (BTYPE=10)
The Huffman codes for the two alphabets appear in the block
immediately after the header bits and before the ...
0
votes
1
answer
154
views
Is the DEFLATE compression algorithm in ZIP and GZip formats based on LZ77 or LZSS?
Wikipedia states that the DEFLATE algorithm (used among others by the ZIP and the GZip compression formats, but also by the PNG image format) is based on the LZ77 algorithm :
Deflate is a lossless ...
1
vote
1
answer
62
views
How can one correctly extract Huffman Tree from a dynamic compressed block?
My problem is similar to the one solved HERE, with few differences.
So the a Deflated block with dynamic Huffman codes is structured like this:
|Block Header|compressed block|end of block|
Then Block ...
0
votes
1
answer
39
views
Is it possible match initial bytes of Deflate compressed data using knowledge of first portion of uncompressed data?
So my obsession with deflate compression is leading me no where but i feel like there is something i can do the process better.
Here is what i understood so far:
def lz77(uncompressed):
#find ...
0
votes
1
answer
47
views
How does a decompressor know the huffman tree that was used by the compressor?
From what i understood Deflate is LZ77 and Huffman encoding but i have been looking at the structure of .zip file but i haven't seen where to extract information about Huffman tree that was used in ...
0
votes
1
answer
142
views
What is the difference between 7-zip Deflate and zlib.compress()?
Helo everyone
I am trying to understand Deflate compression but from what i have seen i think i have misunderstood or done something wrong.
So i grabbed a source code for 7zip so i might understand ...
1
vote
1
answer
76
views
Does `deflate` always compress your entire block?
Here's example from the documentation:
byte[] output = new byte[100];
Deflater compresser = new Deflater();
compresser.setInput(input);
compresser.finish();
int compressedDataLength = compresser....