See more on Chunks in general.
This is an “index”, of the files stored within the archive.
The Flags are all used in the general manner. Specifically, r (range of instances) , p (multi-part) & c, and y (payload specification) flags are all available. The i (instance sizes field is present) flag must be set whenever r is set.
The b (subtype) flag is set when the Subtype is present (see below).
The Subtype is assigned as follows:
Subtype | meaning |
---|---|
absent | main archive index |
0 | per-part index |
1 | alternate index |
2 | subdirectory index |
3 | supplimental or included index |
The main archive index, which must have Instance Number 0 and be unique in the entire archive, is the starting point for searching or listing the contents of the archive.
A per-part index lists just the contents of that file in a multi-file archive. It serves as an alternate starting point if the user puts in the correct disc when he asks for extraction, and the program won't have to look at the disk that contains the main archive index first.
Alternate indices list alternative views of the file list. Alternates may, for example, contain different contents for different platforms, different languages, or different versions. The presence of more than one alternate index gives the user a choice as to which alternative he wants. An index can list common files and then have alternatives listing those that differ.
∴need a detailed explaination of this and how to use it, on its own page.
A subdirectory index gives the contents of a subdirectory, with the common prefix specified by the parent index assumed on all entries. Files in a subdirectory don’t have to use a subdirectory index, but doing so eliminates redundant naming of the subdirectory name on each entry.
A supplimental, or included index is merged in with the includer, but does not specify a prefix or parent directory. This is used simply to break up a long index into pieces, provide different ROOT records for different groups of files, have common file sets included into more than one alternative index, or to have different payload specifications on different parts of the index. Other uses may suggest themselves.
The Instance Number is used in different ways for different Subtypes.
The Instance Number must be 0 for the main archive index and the per-part indices. The main archive index is unique in the archive (through other parts can contain an INDX-nd to point back to it). For the per-part indices, each portition file can have its own in a multi-part archive.
The alternate indices and subdirectory indices have unique non-zero instance numbers each (an alternate index may have the same number as a subdirectory index). As usual, instances may not be duplicated anywhere in an archive, even across multiple files.
The Payload contains several fields followed by a record for each entry.
A uintV indicating the file system of the creator. The decoder can use this information to help interpret the contents. It can watch out for naming differences, know to expect resource forks or data streams, and in general know details of the idiosyncrasies of the original (or intended) platform.
code | meaning |
---|---|
0 | unspecified |
1 | classic FAT with 8.3 names only |
2 | FAT-32 or FAT with long name support |
3 | HPFS |
4 | NTFS |
5 | Macintosh before OS-X |
6 | Machitosh OS-X |
7 | UNIX with elf type binaries |
8 | UNIX (other) |
9 | ISO 9660 (CD file system) |
10 | UDF |
A uintV specifying the number of ticks in a day. For example, to have one-second resolution use 86400.
There is one record for each entry in the index. Each record contains:
A byte specifying the type of entry in the low bits, and some common attributes in the high-order bits.
[PR...###]
code | meaning |
---|---|
0 | ordinary file |
1 | subdirectory name |
2 | subdirectory index |
3 | included index |
4 | alternative index |
5 | volume label |
6 | symbolic or hard link (not yet defined) |
7 | reserve a DATA instance for another purposeneed to explain |
Need to write a section describing each of these codes.
The R bit indicates read-only. This corresponds to the read-only file attribute in DOS and Windows operating systems, and the absence of the write bit for anyone in UNIX file systems. For more detailed settings, use the UNIX and/or FATR chunks.
The P bit indicates private. This indicates that the extracted file should only be visible to the user that extracted it.
This is lpstring containing the name of the file or subdirectory, or a description of an alternative index. Names use a universal (file-system independant) system for indicating subdirectories and other special things, explained here.
This is a uintV indicating where to find the contents of this entry. For a file or reserved DATA, this is the Instance Number of a DATA chunk (and of all chunks of any type with the a flag set). For a subdirectory or volume label, this value is ignored. For a link, this is the index of a LINK chunk, not yet defined. For a subdirectory index or included index, this is the instance number of the proper subtype of INDX.
This is a sintV specifying the file’s date/time as the number of ticks delta from the previous entry. For the first entry, the number indicates the number of ticks since 00:00:00 UTC, January 1, 1970.
∴explain the usage of subdir names vs subdir index
A part number, as with DATA.
Page content copyright 2003 by John M. Dlugosz. Home:http://www.dlugosz.com, email:mailto:john@dlugosz.com