home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Fish 1
/
GoldFishApril1994_CD1.img
/
d1xx
/
d108
/
zoo
/
fiz.zoo
/
fiz.doc
< prev
next >
Wrap
Text File
|
1987-06-28
|
7KB
|
175 lines
Fiz -- a Fix Zoo Utility
by
Rahul Dhesi
Fiz version 1.00 for is a public domain utility that can help you extract
data from a damaged Zoo archive. It is used in conjunction with Zoo version
1.41 or later. Fiz is invoked as follows:
fiz archive[.zoo]
Fiz searches through the archive for directory entries. For each directory
entry found, it prints the position of the directory entry within the ar-
chive (a decimal number), the associated path prefix if any, the short
filename, and the long filename if any. The first directory entry listed
(with a meaningless filename) is usually the archive header and should be
ignored. The last directory entry listed (with null directory and file
names) is the trailing null directory entry that every Zoo archive contains
and this too should be ignored.
Fiz converts any unprintable characters encountered in a filename to printa-
ble equivalents before printing them. Control characters are converted to
corresponding digraphs (e.g. control A becomes "^A") and characters with the
eighth bit set are printed preceded by a tilde ("~"). If Fiz detects a
corrupted directory entry CRC (not the file data CRC), it indicates so.
Make a record of Fiz's output by redirecting it to a file. Then list the
undamaged files using Zoo version 1.41 or later as follows:
zoo l@n archive[.zoo]
where n is a position within the damaged Zoo archive, obtained from the
output of Fiz. If n is properly chosen, the damaged portion of the Zoo
archive will be ignored and all remaining undamaged filenames will be
listed. To extract undamaged files use the command:
zoo x@n archive[.zoo]
The @n option may be used in combination with all other legal options. For
example, the command
zoo xdd@309 jkl *.c
will extract only deleted files matching "*.c", beginning at position 309
within the archive "jkl.zoo". Similarly, the command
zoo La@8992 /new/*.zoo /doc/*.zoo
will list the contents of all Zoo archives in /new and /doc directories,
beginning the listing of each archive at position 8992.
SAMPLE RUN UNDER MS-DOS
A damaged practice Zoo archive called "damaged.zoo" is supplied with Fiz.
Attempting to get a listing with Zoo 1.41 gives the following result:
Archive damaged.zoo:
Zoo: WARNING: Archive damaged.zoo: Zoo 31.0 or later is needed to fully
manipulate this archive.
Zoo: FATAL: Archive damaged.zoo: Directory entry in archive is invalid.
Zoo: No files matched.
(The archive is empty.)
Zoo 31.0 is not due to be released until well into the 22nd century, so the
archive header is clearly corrupted.
Here is the output from Fiz when it is used on this archive with the command
"fiz damaged":
****************
20: [~^K]
****************
34: [/xyz/usr/dhesi] [saying.fir] [saying.first] [*bad CRC*]
****************
264: [/xyz/usr/dhesi] [saying.sec] [saying.second] [*bad CRC*]
****************
494: [^A^B^C^D^E^F^I^J^K^L^M^N] [^K^S^J^D^I^E^J^L^D^N^F^K^E^I^I^U
^U^F^L^F^J^K^L^Sjfdlksd] [*bad CRC*]
****************
672: [Another_.nam] [Another.file.with.a.long.name]
****************
892: [adage.3]
****************
1337: [adage.4]
****************
1477: [] [] []
The garbaged filename at position 20 is the archive header; we ignore it.
Following that are six files, all of which except one seem to have meaning-
ful filenames. The first three directory entries seem to be corrupted,
because Fiz has detected a bad CRC and indicated so. However, it is still
worth trying to recover data from them because the file data may still be
undamaged.
Now, knowing the positions of the directory entries that Fiz could
recognize, we can try listing the undamaged part of the archive with the
command:
zoo l@34 damaged
The result is:
Archive damaged.zoo:
Zoo: Starting at 34
Length CF Size Now Date Time
-------- --- -------- --------- --------
146 5% 139 31 Jan 87 18:55:14 /xyz/usr/dhesi/saying.first*
161 14% 138 31 Jan 87 18:54:36 /xyz/usr/dhesi/saying.second*
88 5% 84 31 Jan 87 18:51:26 ...
146 13% 127 31 Jan 87 18:52:12 Another.file.with.a.long.name
551 30% 384 31 Jan 87 18:55:46 adage.3
81 2% 79 31 Jan 87 18:56:50 adage.4
-------- --- -------- --------- --------
1173 19% 951 6 files
*: directory entry may be corrupted.
Let's explore at a different point in the archive with the command:
zoo l@672 damaged
The result is:
Archive damaged.zoo:
Zoo: Starting at 672
Length CF Size Now Date Time
-------- --- -------- --------- --------
146 13% 127 31 Jan 87 18:52:12 Another.file.with.a.long.name
551 30% 384 31 Jan 87 18:55:46 adage.3
81 2% 79 31 Jan 87 18:56:50 adage.4
-------- --- -------- --------- --------
778 24% 590 3 files
Things look hopeful! The last three directory entries seem to be intact,
and if we are lucky, the first three files might also be recoverable. To
extract the recoverable data, we try the command:
zoo x@34 damaged
and we see:
Zoo: Starting at 34
Zoo: saying.fir -- extracted
Zoo: saying.sec -- extracted
Zoo: ksjdiejl.dnf -- extracted
Zoo: Another_.nam -- extracted
Zoo: adage.3 -- extracted
Zoo: adage.4 -- extracted
Since no CRC error occurred during extraction, we may assume that all ar-
chived files were recovered undamaged. We were lucky: none of the damage
was in the file data.
NOTES
In a badly-damaged archive, Fiz may recognize a directory entry but the file
data associated with that directory entry may be corrupted. If Zoo reports
a CRC error when extracting a file, do not use that file, since it is
corrupted. On rare occasions, if a file is badly corrupted, it may send Zoo
into an infinite loop when extraction is attempted. In such cases you
should skip that directory entry and try again with the next directory entry
that was listed by Fiz.
If Fiz lists a directory entry in which the filename appears to be garbage,
it is still worthwhile trying to extract that file. Zoo 1.40 and later, if
correctly implemented, will correct the filename syntax to make it accepta-
ble to the host system. If the only damage was to the name of the file, the
file data will still be extractable.
Fiz never changes the archive that it acts on.
-- Rahul Dhesi 1987/02/07