Unix ar Archive MIME Type

Learn what application/x-unix-archive means, how ar archives and static libraries work, and how Poly handles .ar files.

MIME type details for application/x-unix-archive

In active use
MIME typeapplication/x-unix-archive
Extensions
.ar.a
Magic number21 3C 61 72 63 68 3E 0A
First standardized1971
Created byBell Laboratories
Browser supportNo native browser support
Example applicationsGNU ar, LLVM llvm-ar, Apple libtool
Poly supportPartial. Poly recognizes .ar as application/x-unix-archive and stores, syncs, shares, and versions it, but does not extract the archive. The common .a extension is not mapped to this type.
Indexed by PolyPartial. Poly indexes the archive's filename and ordinary file properties, but not member names, symbols, metadata, or contents.
Preview in PolyNo. Poly has no in-app ar archive browser; download the file and inspect it with an ar-compatible tool.
Poly agentNo. The Poly agent cannot read or reason about members packed inside an ar archive.

What does application/x-unix-archive mean?

The application/x-unix-archive media type identifies an archive in the Unix ar family. An ar file holds a sequence of members, usually compiled object files. Build systems commonly use that container as a static library with a name such as libexample.a, although an ar archive can contain any kind of file.1

The label is useful but not formally registered. application/x-unix-archive does not appear in IANA's application media-type registry, and other software uses application/x-archive for the same family.23 That means a MIME label alone is not enough to select a particular ar variant.

An ar archive groups files but does not normally compress their contents. It is not the same as a TAR archive, and changing .ar or .a to .tar does not convert it.

Where did the Unix ar format come from?

The format reaches back to early Unix at Bell Laboratories. The first edition of the Unix Programmer's Manual, dated November 3, 1971, documented the ar command and archive-related tooling. This page therefore uses 1971 as the origin year.4

Ar remains relevant because linkers consume static libraries built from object files. The archive can carry a symbol table so a linker can locate the member defining a needed symbol without scanning every member in full.1 Modern tools also use deterministic archives, which replace variable timestamps and ownership fields with fixed values to make repeated builds reproducible.5

How do you identify an ar archive?

A conventional ar archive begins with the eight ASCII bytes !<arch>\n, represented in hexadecimal as 21 3C 61 72 63 68 3E 0A. Members follow in even-length records. Each member starts with a fixed-width ASCII header describing its name, modification time, owner, group, mode, and size.6

The beginning therefore looks like:

21 3C 61 72 63 68 3E 0A ...
!  <  a  r  c  h  >  \n

That signature is stronger evidence than an extension. The .a suffix is the usual convention for a static library, while .ar makes the container itself explicit.37

Several incompatible details exist behind the shared outer structure. GNU, BSD, Darwin, and System V variants differ in areas such as long member names and symbol-table conventions. LLVM's current llvm-ar reads SVR4, GNU, BSD, AIX big archives, and Darwin archives, and it can write several of those styles.5

GNU thin archives use a different !<thin>\n signature and refer to member files elsewhere on disk instead of embedding their data. Moving a thin archive without its referenced files can break it, and distributing one may disclose relative paths.1

How do you open an application/x-unix-archive file?

Browsers do not provide a native member browser for ar archives. Download the file and use a build tool or archive utility that understands its variant.

GNU Binutils and LLVM both provide compatible command-line tools. These commands only list and inspect the archive:

ar t library.a
ar tv library.a
nm -s library.a

To extract members into a new, empty directory, change to that directory and run:

ar x ../library.a

Listing first matters because extraction writes member names to disk. Treat archives from unknown sources as untrusted input, and do not link extracted object files into software you plan to run unless you trust their origin.

Support in Poly

Poly recognizes .ar filenames as application/x-unix-archive and classifies them as archives. It can store, sync, share, version, download, and find the outer file by name.

Poly treats the payload as opaque:

  • It does not list or extract members.
  • It does not parse the archive symbol table or embedded object files.
  • It does not generate a thumbnail or in-app archive preview.
  • It does not index member names or contents, and the Poly agent cannot read them.

The common .a extension is an important limitation. Poly's filename map currently recognizes .ar, but not .a, as this MIME type. A .a file can still be stored, but filename inference will not identify it as application/x-unix-archive.

Is an ar archive the same as a static library?

Not exactly. Ar is the container. A static library is a common use of that container, usually holding relocatable object files plus a symbol index. Ar can also hold arbitrary files, and not every .a library uses identical object formats or archive conventions.15

Apple likewise describes static libraries as archives of object files and uses the .a extension. A library built for one operating system or processor is not automatically usable on another, even when both tools recognize the outer ar container.7

How does ar compare with TAR and ZIP?

PropertyarTARZIP
Main useStatic libraries and toolchain archivesFilesystem-oriented bundles and backupsGeneral compressed interchange
Typical extension.a, .ar.tar.zip
Built-in compressionNormally noneNone in the base formatYes
Linker symbol tableCommon for object librariesNoNo
Format variantsGNU, BSD, Darwin, SVR4, and othersSeveral extensions to a common tape-archive modelVersioned feature set

Choose TAR when directory structure and filesystem metadata are central. Choose ZIP when recipients need a broadly supported compressed package. Choose ar when a compiler toolchain or another specification explicitly expects it.

Debian's .deb format is a useful example of ar used as a higher-level container. A Debian binary package is an ar archive whose members include debian-binary, a control TAR archive, and a data TAR archive.8 Use dpkg-deb for package work because it understands those required members and package semantics. Raw ar only exposes the outer container.

Can you convert an ar archive?

Archive conversion means extracting the members and creating a new container. It does not convert object code inside a static library.

  • Use TAR when you want a Unix-oriented file bundle rather than a linkable library.
  • Use ZIP when convenient desktop interchange matters more than Unix metadata.
  • Rebuild a static library with the target platform's compiler and archiver when architecture, object format, or symbol-table compatibility matters.

Do not convert a .a library to ZIP and expect a linker to accept it. The linker expects ar structure, compatible object files, and often a usable symbol index.

Footnotes

  1. GNU Binutils. ar. The manual describes archive members, library symbol indexes, ordinary and thin archives, and extraction operations. 2 3 4
  2. Internet Assigned Numbers Authority. Media Types Registry. The application registry does not list application/x-unix-archive or application/x-archive.
  3. Apache Tika. Core MIME Type Definitions. Tika associates .a and .ar with the ar family and lists application/x-unix-archive as an alias of application/x-archive. 2
  4. Nokia Bell Labs. Unix Programmer's Manual, First Edition. The surviving manual is dated November 3, 1971 and includes the original command and file-format sections.
  5. LLVM Project. llvm-ar Command Guide. The guide documents supported archive variants, symbol tables, deterministic mode, and thin archives. 2 3
  6. LLVM Project. llvm-ar File Format. The format description specifies the eight-byte signature and member-header fields.
  7. Apple. Overview of Dynamic Libraries. Apple describes static libraries as collections or archives of object files; its toolchain documentation uses the .a convention. 2
  8. Debian. Packaging System: Tools and Fundamental Principles. The handbook shows the three principal members of a Debian package's outer ar archive.
© Poly Corp. 2026