RemenDeKO
Last
updated: Dec. 15, 2003
Information
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
rdko badfile.zip
-c
rdko goodfile.zip
-p
rdko badfile.zip
-f
Download
How it works
There are 3 steps:
- 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:
rdko somefile.zip
-c
(16 KB blocks,
output is "somefile.zip.chk")
rdko anotherfile.zip
-c2048
(2
KB blocks, output is "anotherfile.zip.chk")
rdko athirdfile.zip
-c thechecksums.chk
(16 KB blocks,
output is "thechecksums.chk")
- 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:
rdko somegoodfile.zip
-p
(reads
"somegoodfile.zip.chk" and creates "somegoodfile.zip.patch")
rdko anothergoodfile.zip
-p anotherfile.zip.chk
(reads
"anotherfile.zip.chk" and creates "anothergoodfile.zip.patch")
rdko athirdgoodfile.zip
-p thechecksums.chk thepatch.patch
(reads
"thechecksums.chk" and creates "thepatch.patch")
- 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:
rdko somefile.zip
-f
(reads
"somefile.zip.patch")
rdko anotherfile.zip
-f anothergoodfile.zip.patch
(reads
"anothergoodfile.zip.patch")
Donations
If you have a PayPal account, and are feeling generous enough to donate, please
do it. :)