Live Business Chat
2015 Jul 01, 09:13:26 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: This is a friendly non-profit discussion group about making money. Click the "NOTIFY" button every chance you get to receive instant alerts about new information. We don't like spam. If your first posts are about something you want from us, it is probably spam, and you will be banned in forums worldwide. No soliciting! If you have problems with the forum, contact badon in the business chat.
 
   Home   Help Search Calendar Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: How to add recovery record to ZIP or 7-Zip archive  (Read 9299 times)
0 Members and 1 Guest are viewing this topic.
Yutaka Sawada
Moderator
Capitalist Pig
*****
Offline Offline

Posts: 625


« on: 2012 Feb 16, 06:51:46 pm »

 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.

Step 2:
Create a single PAR2 file for the archive 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 file ][ Appended PAR2 recovery data ]

 Because the file header is still the one of archive, it is treated as archive file, and it can be extract with normal archiver software. 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 is 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. I wrote a sample batch script to do this task, which is included in MultiPar's help.

* batch.htm (15.72 KB - downloaded 1199 times.)
Logged
Brat.T
Doer
*
Offline Offline

Posts: 32


« Reply #1 on: 2012 Feb 18, 10:52:46 pm »

I was always wondering why the context menu shows verify entry even when the file is not a parchive. So that's the reason.
Really great.
Logged
badon
Administrator
Capitalist Pig
*****
Offline Offline

Posts: 9906


badon™


« Reply #2 on: 2012 Feb 25, 05:49:13 pm »

Interesting. I wonder if the 7zip author can use MultiPar to add recovery features to 7zip?
Logged

If families are a problem for the system, then we must reject the system, not the families.
Founder of the Coin Compendium (forum, blogs, calendar, images, donate, contribute).
LBC makes you rich, with a free ebay gift certificate awarded every month!
The Coin Compendium and the china-mint.info forum, censure, disclosure.
Do not PM questions. Answers should be publicly available.
Backup is not enough. Protect your data with MultiPar.
Writer of LBC Chinese coin investment articles (list).
About me: User:Badon - MediaWiki.org
Badon effect: type 1 to 8, type 9.
I type faster on a TypeMatrix.
Use my work. Give credit.
Coin, medal, whatever!
Coin storage advice.
FreeArc is amazing.
User contributions for Badon - Coin Compendium
badon
Administrator
Capitalist Pig
*****
Offline Offline

Posts: 9906


badon™


« Reply #3 on: 2012 Jun 30, 07:18:47 pm »

The FreeArc developer plans to implement a Reed-Solomon recovery record. I made a post that mentions this one:

https://sourceforge.net/apps/phpbb/freearc/viewtopic.php?f=3&t=215

Maybe FreeArc will be the first file archiver to be officially compatible with MultiPar?
Logged

If families are a problem for the system, then we must reject the system, not the families.
Founder of the Coin Compendium (forum, blogs, calendar, images, donate, contribute).
LBC makes you rich, with a free ebay gift certificate awarded every month!
The Coin Compendium and the china-mint.info forum, censure, disclosure.
Do not PM questions. Answers should be publicly available.
Backup is not enough. Protect your data with MultiPar.
Writer of LBC Chinese coin investment articles (list).
About me: User:Badon - MediaWiki.org
Badon effect: type 1 to 8, type 9.
I type faster on a TypeMatrix.
Use my work. Give credit.
Coin, medal, whatever!
Coin storage advice.
FreeArc is amazing.
User contributions for Badon - Coin Compendium
Yutaka Sawada
Moderator
Capitalist Pig
*****
Offline Offline

Posts: 625


« Reply #4 on: 2012 Jul 03, 05:26:31 pm »

 I'm not sure that appending PAR2 recovery data is good for a new archiver format. From a view of compression, PAR2 file is redundant and inefficient. While the redundancy is good for recovery, it is bad for compression rate. Using PAR2 file is an easy solution, but is not the best way in a special file format.

 A good point of PAR2 file is common format. To use recovery record of WinRAR, you need to use WinRAR (non freeware). Though RSC32 or ICE ECC is good for recovery, they are usable on Windows OS only. There are many PAR2 client for many OSes, and all users can append a PAR2 file onto any file freely. And other users can verify/repair with the PAR2 recovery data. Thus, this method will be suitable for widely used major file format.
Logged
badon
Administrator
Capitalist Pig
*****
Offline Offline

Posts: 9906


badon™


« Reply #5 on: 2012 Jul 03, 07:32:05 pm »

Right, the whole idea behind using PAR2 for recovery data in an archive format is that it is a standard, accessible to anyone, using a wide variety of tools. If archivers like FreeArc become capable of adding PAR2 recovery data to their archives, it will be much easier for people to both compress their data, and protect it from corruption.

The most important reason to do that is for user-friendliness. How many people do you know that are willing and able to append binary file data manually? I don't know anyone, not even at the universities. No matter how technically competent a person is, user-friendliness is always an improvement, and it will ensure that MultiPar and other implementations of Parchive technology get the wide use they deserve.
Logged

If families are a problem for the system, then we must reject the system, not the families.
Founder of the Coin Compendium (forum, blogs, calendar, images, donate, contribute).
LBC makes you rich, with a free ebay gift certificate awarded every month!
The Coin Compendium and the china-mint.info forum, censure, disclosure.
Do not PM questions. Answers should be publicly available.
Backup is not enough. Protect your data with MultiPar.
Writer of LBC Chinese coin investment articles (list).
About me: User:Badon - MediaWiki.org
Badon effect: type 1 to 8, type 9.
I type faster on a TypeMatrix.
Use my work. Give credit.
Coin, medal, whatever!
Coin storage advice.
FreeArc is amazing.
User contributions for Badon - Coin Compendium
grehe
Almost Nobody

Offline Offline

Posts: 4


« Reply #6 on: 2013 Sep 16, 12:42:03 am »

Have you ever thought about using tar? I'm not sure how it affect winzip, but I use 7z alot and what I've done as a test was to tar the two files together, then rename the tar file back to a 7z file. There is a slight overhead, about 100k, but not much. When opening as a 7z file, it will show the original pdf file. When opening as a tar file, it will show the 7z + par2 files. And when opening as a par2 file, well... it doesn't say "Appended" yet  Wink but no parts are damaged and repair is possible as well.
Logged
Yutaka Sawada
Moderator
Capitalist Pig
*****
Offline Offline

Posts: 625


« Reply #7 on: 2013 Sep 18, 10:29:22 pm »

 I never use TAR file format. Though it seems to be a non-compressed archive, I don't know the encoding mode. You may use whatever non-encoded archive format to join some files. It is same as putting both source files and PAR2 files in a ISO-image for CD-R, or putting them in a non-compressed ZIP file.

 But, there is a problem of ignoring small source files in the archive. MultiPar (and QuickPar) won't search tiny file (smaller than block size) in an archive file, because it is slow and inefficient in PAR2. (I plan to solve this problem in PAR3.)
Logged
blueskull
Almost Nobody

Offline Offline

Posts: 1


« Reply #8 on: 2014 Nov 25, 01:11:29 am »

Actually maybe Sawada-san can work with Mr. Pavlov to create a PAR2 enabled 7z, or at least a 7z extension.

It should not be hard. The attachment is a very preliminary version of my work, to create PAR2 enabled 7z files.

Nothing fancy, but handy, especially for small and valuable files, like source code and other design documents.

It integrates into your right click context menu, and allows for direct PAR2 appending of 7z/xz/zip files, and it
can create recovery record enabled 7z files for folders.

I may not improve this program after this release, because it fulfills my requirements for now. But I really wish
if somebody can build a really very handy and user friendly 7z+PAR2 solution.

The code is in public domain, in other words, you can do whatever things you want to do with it, as long as you
don't infringe the others' copyright.

* pbackup_setup.exe (415 KB - downloaded 36 times.)
* pbackup.c (2.16 KB - downloaded 43 times.)
* makefile (0.05 KB - downloaded 28 times.)
Logged
JDługosz
Entrepreneur
**
Offline Offline

Posts: 54


« Reply #9 on: 2015 Apr 14, 03:18:20 pm »

I think the idea of both compressing and then fluffing it up again is contradictory.  With the typical newsgroup use, a huge archive is split into multiple small posts, and the par2 files are more redundant parts.  One only downloads the extra parts if necessary, and only as many as necessary.  Note that the archive itself is split up; that is the opposite of combining with other files.

A low-overhead outer wrapper could collect together the ZIP, PAR2, SHA, attribution, and readme.  That makes it explicit that there are different parts, and they can be removed or kept as desired.

(Note: tar doesn't have compression, or even indexing.  It's just a concatenation of all the files with a simple delimiter between them.  Originally used for copying things to tape.  Modern use is to first tar and then gz the result, adding the compression.  That same philosophy would suggest that you bundle the par2 as another step as well:  Tar{ readme, gz{ tar { file,file,…,file } }, par2 }

Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.519 seconds with 20 queries.