1. Create a checksum file of the corrupted file.
2. Using the checksum file, create a patch file from the original file.
3. Apply the patch file to the corrupted file.
In this example, let's assume you've downloaded a large file named freebsd4.8.iso from a remote ftp which you have shell access to. The file was corrupted during transfer and you need to use zidrav to fix the file.
zidrav freebsd4.8.iso
zidrav -p freebsd.4.8.iso
zidrav -a freebsd.4.8.iso