Last updated: Dec. 15, 2003


A file corruption detection and correction program.
The project home at SourceForge is here.

I wrote this program when I had problems downloading Gnoppix 0.5.3; I downloaded it two times (almost 500 MB), but the MD5 never was right; so I asked a friend (who was lucky to download a perfect iso) to use Zidrav on his file, to fix mine. After around 6 times, I gave up, I realized that Zidrav was damaging my file even more (the patch was getting bigger each time). In around 4 hours I had version 0.1 working well enought to fix my file. :-)

If you have any suggestion or bug report, please go to the project home and contribute. :-)

Note: if you want to use the GUI front-end (GReDeKO), you'll need to have GTK+ 2.x installed on your system. You can download it bellow.

Quick start

    1. rdko -c
    2. rdko -p
    3. rdko -f


How it works

There are 3 steps:
  1. Create a checksum file ("-c" option) - the checksum file is filled with CRC32 sums from the damaged file, one per block (the default block size is 16 KB, but you can specify your own block size, like "-c1024" for 1 KB blocks, or "-c131072" for 128 KB blocks). Keep on mind that with small blocks, the patch is smaller, but the checksums file gets bigger; on th eother hand, with big blocks, your checksum gets smaller, but the patch will usually grow. You should just specify your own block size when you know something about the corrupted file; if it has long spaces with invalid/incorrect data (say, an incomplete download with pre-allocated space), the patch will probably be bigger, so you can use a large block size. Example:
  2. Create a patch file ("-p" option) - now you use a file that you know is not corrupted, and the checksum file from the corrupted file, to create a patch file. It'll just compare the CRC32 sum for each block; if they differ, the data will be copied to the patch file, inside a PatchPacket. One PatchPacket can be of any size, so if you got three consecutive bad blocks, one PatchPacket will cover them all. Example:
  3. Fix the file ("-f" option) - reads each PatchPacket from the patch file and copies the content to the correct position into the corrupted file; it also truncates the file if there's a "ftruncate" function available in the system (under Windows it emulates this function, using g_win32_ftruncate, taken from GLib). Example:


If you have a PayPal account, and are feeling generous enough to donate, please do it. :)

Copyright 2003 - Daniel K. O. Logo