Menu

7-zip (7z.exe) option to output offsets of crc errors

HoraK-FDF
2015-02-17
2015-02-18
  • HoraK-FDF

    HoraK-FDF - 2015-02-17

    Hi,

    it would be nice if 7-zip (7z.exe) has an option to output the offsets of crc errors if they occur. One Reason is when loading big files from the internet and something went wrong it often is only a small amount that must be redownloaded if the offset is known instead of reloading the whole file. I have tryed to create an script that can do this but all compression programms i have looked at, dont have such an feature so i had to take the long way: start process monitor and tell it to look for what 7-zip does, then start 7-zip -> start extracting and wait until extraction error occurs and than go to process monitor and look at the shown offet of the file 7-zip accessed at last, than take this value and redownload from this point + some bytes with curl and than inject the file downloaded with curl to the offset in the damaged file with dd. With such on option it would be possible to make scripts that can run alone and repair broken files. Or did i miss something and such an option is allready inside?

     
  • Igor Pavlov

    Igor Pavlov - 2015-02-17

    It's not simple to implement such feature for solid archives.
    In any case it can be difficult to recover such things for usual user.

     
  • Shell

    Shell - 2015-02-18

    As an intermediate step, 7-Zip could tell the offset of each solid block in the archive - it should be easy. The user could then look up the offset of the first damaged block. If the archive does not consist of a single block, this will help somewhat. However, I agree with Igor Pavlov that such information will only be used by experienced users.

    Also, the original problem could be solved with the introduction of recovery record. If this feature will ever be implemented, I suggest to output the offsets of damaged "sectors". Just for comparison, WinRAR does that in the console mode.

     
  • Bulat Ziganshin

    Bulat Ziganshin - 2015-02-18

    freearc has such feature, it can either save ranges of bad data:

    arc t archive.arc --save-bad-ranges=FILE

    or automatically redownload broken parts during extraction:

    arc t archive.arc --original=URL

    this feature doesn't rely on regular file CRCs, but employs data recovery record, so you should add RR at archive creation. it may be as small 0.01% though:

    arc a archive.arc -rr0.01%

     

Log in to post a comment.