Module goblin::archive [] [src]

Implements a simple parser and extractor for a Unix Archive.

There are two "common" formats: BSD and SysV

This crate currently only implements the SysV version, which essentially postfixes all names in the archive with a / as a sigil for the end of the name, and uses a special symbol index for looking up symbols faster.

Structs

Archive

An in-memory representation of a parsed Unix Archive

Header
Index

The special index member signified by the name '/'. The data element contains a list of symbol indexes and symbol names, giving their offsets into the archive for a given name.

Member

Represents a single entry in the archive

MemberHeader

A Unix Archive Header - meta data for the file/byte blob/whatever that follows exactly after. All data is right-padded with spaces ASCII 0x20. The Binary layout is as follows:

Constants

MAGIC

The magic number of a Unix Archive

SIZEOF_HEADER
SIZEOF_MAGIC