ARI (compressed archive)
ARI is a compressed archive utility for DOS, and associated file format, developed by RAO Inc. It was distributed as freeware, and there was a registered version with more features.
Contents |
Format details
File structure
This information (written for the fileformats.archiveteam.org wiki) pertains to ARI and ERI, and is based on reverse engineering. It may be incorrect, and is likely incomplete. The software has many features whose effect on the format has not been tested.
An ARI or ERI file is a sequence of "member file" segments, each with the following structure:
Size in bytes | Name | Description and remarks |
---|---|---|
path_len | filename_path | Variable size, often absent. The logic for finding the size is unclear. |
8 | filename_base | Filename, base part, padded with spaces or NUL bytes |
3 | filename_ext | Filename extension, padded |
1 | File attributes and other flags. 0x80 bit may be set when filename_path is present. | |
2 | timestamp_time | DOS time/date |
2 | timestamp_date | |
4 | Original file size | |
4 | member_size | Total size of this member (header + cdata) |
4 | "CRC-32" (derived from the uncompressed file data) | |
member_size−(path_len+28) | cdata | Compressed file data |
CRC algorithm
Each member file has a "CRC-32" field (as named by the software's "l" command, though it is only a CRC in the loosest sense of the term). The algorithm and file format are the same for ARI and ERI, but their "l" commands display it differently. Assuming the byte order in the file is 0-1-2-3, ERI displays 3-2-1-0, while ARI displays 1-0-3-2.
Think of it as four separate 1-byte checksums: ck[0...3]. As each input byte is processed, two of the "ck" bytes are updated: one using an "ADD" function, and one using an "XOR" function.
The "ADD" function: ck[n] := (ck[n] + source_byte) mod 256
The "XOR" function: ck[n] := ck[n] XOR ((source_byte + 1) mod 256)
The first byte of the file updates ck[0] with ADD, and ck[1] with XOR. The second byte updates ck[1] (ADD) and ck[2] (XOR). Then 2-3 for the third byte, then 3-0, then back to 0-1, repeating with a period of 4 bytes.
Related formats
- ERI (compressed archive) - successor?
Software
- ARI 1.12 (seems very buggy)
- ARI 1.13u: Simtel MSDOS 1996-09 → Simtel-MSDOS-Sep1996-CD2.iso → DISC2/ARCERS/ARI113U.ZIP
- ARI 1.13v
- Another copy: CHIP 1996. október (CD 08) → CHIP_CD08.{BIN,CUE} → sac/pack/ari113v.zip
- ARI 1.14
- ARI 1.14c and 1.13w
- Another copy: DP Tool Club CD ASC #03, 08, 31-34 → CDASC_33_1996_novembre.iso → DOS/TOOLS/ARI114C.ZIP
- ARI 2.14
- ARI 2.15
- ARI 2.2
- Various versions of ARI at old-dos.ru