GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing archive.org — Internet Archive: ARC File Format Reference Arc File FormatAuthors: Mike Burner and Brewster Kahle
OverviewThe Archive stores the data it collects in large (currently 100MB) aggregate files for ease of storage in a conventional file system. It is the Archive's experience that it is difficult to manage hundreds of millions of small files in most existing file systems. This document describes the format of the aggregate files. The file format was designed to meet several requirements: The file must be self-contained: it must permit the aggregated objects to be identified and unpacked without the use of a companion index file. The format must be extensible to accommodate files retrieved via a variety of network protocols, including http, ftp, news, gopher, and mail. The file must be "stream able": it must be possible to concatenate multiple archive files in a data stream. Once written, a record must be viable: the integrity of the file must not depend on subsequent creation of an in-file index of the contents. The reader will quickly recognize, however, that an external index of the contents and object-offsets will greatly enhance the retrievability of objects stored in this format. The Archive maintains such indices, but does not seek to standardize their format. The Archive File FormatThe description below uses pseudo-BNF to describe the archive file format. By convention, archive files are named with a ".arc" extension (e.g., "IA-000001.arc"). The Version BlockThe version block identifies the original filename, file version, and URL record fields of the archive file.
The URL RecordThe URL record introduces an object in the archive file. It gives the name and size of the object, as well as several pieces of metadata about its retrieval. Example of an Archive FileIn the following example, please remember that length includes carriage returns and line feeds. filedesc://IA-001102.arc
0 19960923142103 text/plain 76 http://www.dryswamp.edu:80/index.html
127.10.100.2 19961104142103 text/html 202 filedesc://IA-001102.arc
0.0.0.0 19960923142103 text/plain 200 - - 0 http://www.dryswamp.edu:80/index.html
127.10.100.2 19961104142103 Reading an Archive FileAs noted above, the best way to retrieve a specific object from an archive file is to maintain an external database of object names, the files they are located in, their offsets within the files, and the sizes of the objects. Then, to retrieve the object, one need only open the file, seek to the offset, and do a single read of <size> bytes. Programs that need to read the file without an index (such as to unpack the whole file) should use buffered I/O. The URL record can then be read with an fgets(), and the objects can be read with an fread() of <size> bytes. Using the Archive Format for other URL typesSince the Archive format uses the standard URL specification to identify objects, it naturally lends itself to the storage of data retrieved via protocols other than HTTP. For example, a news article might appear as follows: news:[email protected]
127.10.100.3 19960929142103 text/plain 328 For more Information please contact [email protected] |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |