top | item 47146730

(no title)

ethmarks | 6 days ago

> You do realize there is both lossy and lossless compression, right?

This is simply wrong. There is no lossy compression for ZIP.

DEFLATE, by far the most common ZIP compression method, uses LZ77 and Huffman Coding, both of which are lossless. There are other methods compatible with ZIP containers as specified by PKWARE (e.g. BZIP2, LZMA, Zstandard, PPMd, etc), but all of them are lossless. According to both the official ZIP specification and every ZIP implementation on Earth, you cannot have a lossy ZIP unless it is corrupted.

There do exist lossy data formats (e.g. JPEG), but if you put those in a ZIP file it'll still encode and decode it losslessly.

discuss

order

defrost|6 days ago

> There is no lossy compression for ZIP.

Did you hyperfixate on the colloquial usage of zip?

ethmarks|6 days ago

> Did you hyperfixate on the colloquial usage of zip?

No? I am not hyperfixating on the colloquial usage of ZIP. The colloquial usage of "zip" would be "any compression container", which is not what I'm talking about. I'm talking about the technical definition of ZIP: the lossless container format specified by PKWARE. I thought that would be obvious by my reference to the PKWARE specification.