Italian version

CreateEcc & Correct v1.0 Alpha by Claudio Fanelli, Copyright 2004

NO RESPONSABILITY WILL BE TAKEN FOR ANY KIND OF DAMEGE MADE BY THESE PROGRAMS

This is an Alpha version
Plese report to me bugs (but also successes) at the e-mail address claudio@claudiofanelli.it. Usage:
createecc <input_file>
correct c <input_file> <output_file>

CreateEcc creates a file (named <input_file.ecc) with the error correction codes (ECC) of
. In this way if some corruption occur in the original file occurs,
Correct can try to restore <input_file> to the state in
which it was when CreateEcc was called.

Notes

  1. For now creteecc and correct are not tested well
  2. No modification is made on the original file by CreateEcc or by Correct, so their use cannot do any damage.
  3. Not all kind of error can be corrected, in particular if the length of the original file was changed, NO error can be corrected ! Note also that is impossible to correct a number of bytes larger than the dimension of .ecc file
  4. under fat16 file-systems problems can occur with the names of the files (fat16 does not support multiple extension or long names)
  5. Many operative systems or devices when a file is even partially damaged reject to read it. This is especially true with CD-ROMS, in which some error can make the entire CD unreadable. In this situation my programs cannot do much.
  6. The two programs are extremally slow !!!

Examples

First example

If you want to see createecc+correct in action easily (without having a currupted file), you can do the following:

  1. Choose a text file (for example this file, index_en.html)
  2. lunch createecc on the file you have choosen: # createecc index.html
  3. Change some letter of the file, WITHOUT changing the lenght of the file: for example you can change the capitalization of the words, you can swap letters or you can substitute letters with spaces. Note that correct cannot do miracles, so the total number of errors must not to be too high.
  4. lunch correct:# correct index.html index.html.original
  5. now you can see if index.html.original is been corrected
  6. Second example

    If you have a backup archive (named for example backup.tgz), it is convenient that you create an ECC file:

    # createecc backup.tgz

    Now you can save backup.tgz and backup.tgz.ecc on CD-ROM, HD, or where do you want.

    If backup.tgz is partially corrupted, you can run:

    # correct backup.tgz backup.corrected.tgz

    and, if the errors are gestible by correct,backup.corrected.tgz willcontain the original, corrected version of backup.tgz.

    Note that is possible that backup.tgz is completally unreadable, even if it has just few errors. So it is better split it in smaller chuncks with split. The dimensions of these chunks should be 1/4 or 1/5 of the dimension of the file .ecc
    If for example such file has length of about 450k, you can use chunks of 100k: #split -b 100k backup.tgz backup.tgz.

    (more then 30-40 chunks are not needed, so if backup.tgz is bigger than 3 or 4 Mbyte you can split it in chunks bigger than 100k)

    Now, if one of the chuncks is unreadable, you can recostruct a copy of backup.tgz coping one of the other chuncks and the using correct. For example if backup.tgz.ao and backup.tgz.ba are unreadable, you can do: # cp /mnt/cdrom/backup.* /tmp/

    (we suppose that backup.tgz.ao and backup.tgz.ba cannot be copied. But note that backup.tgz.ecc MUST be copied, or we cannot do nothing)

    # cp /mnt/cdrom/backup.aa /tmp/backup.tgz.ao # cp /mnt/cdrom/backup.aa /tmp/backup.tgz.ba # cat /tmp/backup.tgz.* >/tmp/backup.tgz.corrupted # correct backup.tgz.corrupted backup.tgz

    Download

    Here you can find the statically linked executables for Linux i386 (17 KBytes)