top | item 47040852

(no title)

sweetjuly | 13 days ago

I suggest you find a new DEFLATE library if you're losing data when you compress things with it :)

discuss

order

godelski|13 days ago

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

Or did you hyperfixate on the colloquial usage of zip

ethmarks|5 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.