Static library and Debian package container.
Overview
An ar file begins with !<arch>\n followed by 60-byte member headers (name, mtime, uid, gid, mode, size and the terminator `\n). Data is padded to even length. BSD and GNU variants store long names differently.
Where it is used
- Static libraries (.a) and Debian packages (.deb).
History
- Part of Unix since the early 1970s.
Status today
- Universal in toolchains and package formats.
Structures read by the implementation
Offsets are in bytes from the start of the buffer named in each heading. Field names are taken from the implementation and are not an official specification. Fixed-width integers are shown as u/i (unsigned/signed) followed by bit width and byte order.
No fixed-offset structures were found in the implementation.
Constants
General ArCarver
| Name | Value | Type | Notes |
|---|---|---|---|
| Magic | “!<arch>\n”u8.ToArray() | byte[] |
Implementation limits reader
| Class | Name | Value | Notes |
|---|---|---|---|
| ArCarver | MaxMembers | 2_000_000 | |
| ArArchiveModule | MaxMembers | 2_000_000 |
Signatures and magic strings referenced
| Text | Where | Context |
|---|---|---|
| !<arch>\n | ArCarver | private static readonly byte[] Magic = “!<arch>\n”u8.ToArray(); |