PDA

View Full Version : Can you duplicate .zip files without having to Copy 'n' Paste?



Ænima
11-20-2007, 06:42 AM
I need to know if I can duplicate a .zip file without Copy-Pasting.

Visual Representation:

Computer 1 contains:
__111.html
__112.mp3
__113.wav
__114.avi
__115.pdf
Computer 2 contains:
__000.zip, which contains:
____111.html
____112.mp3
____113.wav
____114.avi
____115.pdf

So, to rephrase my question, is there a way to archive the files on computer 1 so as to exactly duplicate, byte-per-byte, the 000.zip archive on computer 2, while only knowing the size of 000.zip and its contents.

Thank you, and happy thinking!

optimus_prime
11-20-2007, 11:06 AM
if files are IDENTICAL i would say it is possible if you know level of compression of the original zip.

zapjb
11-20-2007, 12:37 PM
Can somebody rephrase the question?

optimus_prime
11-20-2007, 03:55 PM
i guess generalized question could be "can you zip files back into identical zip file they were unpacked from?"
obviously it is a matter of guessing original zip packer and compression options used :)

Ænima
11-21-2007, 09:48 AM
Aren't there unique CRC codes attributes to each file in the .zip archive. I don't think they can be duplicated.

ilw
11-22-2007, 01:15 AM
should work that way provided the files get added to the archive in the same order and you use the same compression settings. i'd say just try it.
zip it on computer 1 and then MD5 the zip files on both computers and see if the MD5 code is the same.

http://www.mgillespie.plus.com/MD5Check.zip

lynx
11-22-2007, 10:36 AM
Details such as date created, date modified, date access, attributes (among others) are available for every file, and are not part of the file contents. If these are all included in the zip file then there's little chance the archives will ever be identical.

I know some of this information is stored, but I don't know how much. Date modified and attributes are certainly there.

optimus_prime
11-22-2007, 11:37 AM
yeah, and sometimes full paths, comments and many other thingies are included too. there was zip spec on pkzip or winzip site, so it's not hard to look up.

i understood this purely as a theoretical question, and in that sense zip can be created equal from identical files as it's lossless compression. i doubt anyone sane would try all the compressors and options in rl tho.