All numbers are encoded in ASCII decimal, unless another base is specified, terminated by either a colon (':') or a NUL byte.
A BArch file contains a stream of records. Each record contains the following parts:
| Record type | Symbol | Metadata Description | Content Description |
|---|---|---|---|
| Start-of-archive | ^ | A series of parameters separated by "&". The name and value in a parameter are seperated by "=" and the contents are URL-encoded. | A list of the paths used to build the archive, each terminated with a NUL byte, prefixed with either a '+' (included paths), or a '-' (excluded paths). This will eventually be used to determine which paths to extract could be in the archive before scanning the archive, to reduce search overheads. |
| Directory | d | Standard file metadata | A list of all the files in the directory, each terminated with a NUL byte |
| File | f | Standard file metadata | The raw contents of the file |
| Incremental File | i | Standard file metadata | Undetermined |
| Block Device | b | Standard file metadata | The major and minor numbers, in hexadecimal, separated by a comma |
| Character Device | c | Standard file metadata | The major and minor numbers, in hexadecimal, separated by a comma |
| Hard Link | h | None | The path being linked to |
| Symbolic Link | l | None | The path being linked to |
| Named Pipe | p | Standard file metadata | None |
| Named Socket | s | Standard file metadata | None |
| End-of-archive | # | None | None |
The standard file metadata is composed of a series of tagged values seperated by colons:
The following parameters are written in the prefix record to identify parameters detailing how the archive was created for the extractor: