A zip file is supposed to be able to reproduce the contents exactly.
One related note though -- it is more difficult to recover the data if a zip file gets corrupt, than if the data was in the original format. Why? Many file formats have built in redundancy, and are designed so that either minor errors are correctable, or minor errors are not critical.
Imagine a video file. In most formats, if a small portion gets corrupt, you will see a temporary flicker in that small portion of the video but can still watch the video. But if the video file is zipped, the error correction capability is reduced, and depending on the extent of corruption, you simply may not be able to unzip the file / watch the video. (This is contrived example as it is useless to zip most video formats in any case).
This is true for any compression format - compression by definition reduces reduncancy and hence error correction capabilities and its a trade-off.
51Maybe the other person has confused zipping a file (lossless) with jpeg compression (lossy) which can make test look ugly. – Matt H – 2011-05-13T02:54:11.217
I know that I once had compatibility problems for zip files, because the file format is used on all platforms... – jokoon – 2011-05-13T12:11:25.480
1I've certainly experienced certain 'pathological' cases where both Winrar and WinXP's built-in facilities broke files (tens of thousands in a single zipfile). This was 4-5 years ago, and the only solution I could find at the time was to use 7-zip. As best I can remember, even 7-Zip couldn't successfully unzip files created by the other routines, suggesting the fault was in the zipping, not the unzipping. Obviously I opted to use 7-zip for both sides in the production system anyway. – FumbleFingers – 2011-05-13T13:51:17.743
1@jokoon: I'm not sure it's valid to speak of a file format...used on all platforms. There are quite a few different internal formats used in zip files, and it's always possible an archive could be created by one packing routine using a format that's imperfectly supported by some other routine that you happen to use at time of unpacking. – FumbleFingers – 2011-05-13T13:55:58.500
@Fumble; But still, any decent archiver should catch the hash change and report the operation as a failure - not leave a broken file lying around. – Phoshi – 2011-05-14T10:34:34.350
@FumbleFingers: in that case, the zip file is not broken, it's just the file is non-standard or the unzip program is non-conformant (i.e. a bug in the unzipping program); IOW it is still possible to unzip (reverse the process of zipping) with the proper program. – Lie Ryan – 2011-05-14T10:40:59.933
@Phoshi, @Lie Ryan: Well obviously since all zip formats are lossless, a file passed in and out of that format can only be 'broken' by software failure (failing to detect h/w or checksum errors is a s/w failure in my book). Looked at that way, everthing posted against this question is actually covered by the single-word answer NO. – FumbleFingers – 2011-05-14T14:27:07.520
I disagree, microsoft would still refuse to fix a bug which happens when opening a zip file created with mac os, saying "it's the way they should do it blablabla". Don't forget about silent errors too, those are quite nasty... – jokoon – 2011-05-14T17:20:43.967
use this link: >http://www.theinternetwizards.com/EazyUnzipping/7-ZIP-tutorial.pdf
– Jayanath – 2011-05-15T12:51:15.723