How to add recovery record to ZIP or 7-Zip archive

  ZIP archive (extension .zip) is used widely and 7-Zip archive (extension .7z) is useful. Because they don't have a feature of recovery record, someone might feel RAR archive is better. But, by using Parchive, normal ZIP or 7-Zip archive can be protected with recovery record also.

Step 1: Create a ZIP or 7-Zip archive file.
ZIP or 7-Zip archive file
Step 2: Create a single PAR2 file for the archive file.
PAR2 recovery file
Step 3: With binary editor or Copy command, append the PAR2 file to the archive file. Then, the appended archive file contains recovery record. The construction of the file is like below;
Original archive fileAppended PAR2 recovery data

Step 4 is required only for ZIP archive:
There is "end of central directory record" (starting with a byte sequence of: 0x06054b50) at the end of ZIP file. With binary editor, copy the section (22-bytes or more) and append it to the end of recovery data. The construction of the file is like below;
Original ZIP archive fileAppended PAR2 recovery data End of central directory record

When the ZIP file is ZIP64 format, there are "zip64 end of central directory record" (starting with a byte sequence of: 0x06064b50), "zip64 end of central directory locator", and "end of central directory record" at the end of ZIP file. With binary editor, copy the 3 sections (total 98-bytes or more) and append them to the end of recovery data.
Original ZIP64 archive fileAppended PAR2 recovery data The final 3 sections of ZIP64 format

  Because the file header is still the one of archive, it's treated as an archive file, and normal archiver software can extract inner files. Because the file contains PAR2 packets, PAR2 client can treat it as PAR2 file also. As MultiPar can treat a PAR2 file which has different extension from ".par2", Drag&Drop the protected archive onto MultiPar short-cut icon will verify the archive file. On the MultiPar GUI, the archive with recovery record is shown as "Appended" status, when the original part of archive is complete.

  Note, if you repair the archive, recovery record (appended PAR2 recovery data) will be removed. When you want to keep the PAR2 recovery data, you need to copy the file at first, and rename it to "something.par2", then open the "something.par2" by MultiPar (or QuickPar). Though you can split a protected archive into original part and recovery record by a binary editor, it's not easy task for normal users.

  I think this method is useful to protect only one archive file. It is same as having two files (an archive file and its PAR2 file), but is convenient for transport / public / distribution as one ZIP/7-Zip file. Normally freeware/shareware publication site accepts only one archive file. If an archiver software has a built-in feature to append PAR2 recovery data to a created archive, it may be useful.