This repository has been archived by the owner on Sep 15, 2021. It is now read-only.
forked from Parchive/par2cmdline
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue Parchive#50 (scan failure) / Correct fix for issue Parchive#31
(slow scan) Issue Parchive#31 was reported as a problem whereby cache collision of crc32 values resulted in the calculation of md5 values at a large number of file positions for certain types of data files. The fix for issue Parchive#31 was to introduce code that would only only scan forwards 10 bytes whilst searching for a good datablock, and then skip the next blocksize-10 bytes before continuing searching. This code will never find blocks that are positioned earlier in the file than they should be, and will also never find blocks that are positioned more than 10 bytes later in the file than they should be. Issue Parchive#50 reported that a single byte erasure at the start of a data file resulted in the complete failure to find any good data block in the file. The fix for issue Parchive#50 is an improvement of the code intended to deal with issue Parchive#31 such that instead of only finding datablocks that are either exactly at the correct position in the file or no more than 10 bytes after the correct position: it will now (by default) check up to 64 bytes before and up to 64 bytes after the expected position of the next block (where the 'expected' position is calculated relative to the position where the last block was found). Additionally, two new commandline parameters were added to enable this code to be tuned: -N : No data skipping (every byte of data will be scanned for blocks) -S<n> : Skip leaway n bytes (check for the next block within +/- n bytes of the expected position before skipping forward) Finally, where the code would previously skip forward a whole block if it found data that it thinks is a duplicate of a block that has already been found, it will now start scanning from that position.
- Loading branch information
PeterBClements
committed
May 26, 2015
1 parent
20f2412
commit dd9c4e6
Showing
7 changed files
with
218 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.