#
# "ar", for all kinds of archives.
#
# XXX - why are there multiple <ar> thingies?  Note that 0x213c6172 is
# "!<ar", so, for new-style (4.xBSD/SVR2andup) archives, we have:
#
# 0	string		!<arch>		current ar archive
# 0	long		0x213c6172	archive file
#
# and for SVR3.1 archives, we have:
#
# 0	string		\<ar>		System V Release 1 ar archive
# 0	string		=<ar>		archive
# 0	string		=<ar>		archive
#
# XXX - did Aegis really store shared libraries, breakpointed modules,
# and absolute code program modules in the same format as new-style
# "ar" archives?
#
0	string		!<arch>		current ar archive
>8	string		__.SYMDEF	random library
>0	belong		=65538		- pre SR9.5
>0	belong		=65539		- post SR9.5
>0	beshort		2		- object archive
>0	beshort		3		- shared library module
>0	beshort		4		- debug break-pointed module
>0	beshort		5		- absolute code program module
0	string		\<ar>		System V Release 1 ar archive
0	string		=<ar>		archive
#
# XXX - from "vax", which appears to collect a bunch of byte-swapped
# thingies, to help you recognize VAX files on big-endian machines;
# with "leshort", "lelong", and "string", that's no longer necessary....
#
# 0	long		0x3c61723e	VAX 5.0 archive
#
0	long		0x213c6172	archive file
0	lelong		0177555		very old VAX archive
0	leshort		0177555		very old PDP-11 archive
#
# XXX - "pdp" claims that 0177545 can have an __.SYMDEF member and thus
# be a random library (it said 0xff65 rather than 0177545).
#
0	lelong		0177545		old VAX archive
>8	string		__.SYMDEF	random library
0	leshort		0177545		old PDP-11 archive
>8	string		__.SYMDEF	random library
#
0	string		=<ar>		archive
#
# From "pdp":
#
0	lelong		0x39bed		PDP-11 old archive
0	lelong		0x39bee		PDP-11 4.0 archive
#
0	string		-h-		Software Tools format archive text
# "arc" archiver
#0	byte		26		'arc' archive
#>1	byte		0		(empty)
#>1	byte		1		(old format)
#
# >>>>> ARJ archiver <<<<< (source: arj 2.39a beta)
#     ARJ archives contains two types of header blocks:
#
#	Archive main header - This is located at the head of the archive
#	Local file header   - This is located before each archived file
#
#     Structure of main header (low order byte first):
#
#     Bytes Description
#     ----- -------------------------------------------------------------------
#       2   header id (main and local file) = 0xEA60 or 60000U
#       2   basic header size (from 'first_hdr_size' thru 'comment' below)
#		 = first_hdr_size + strlen(filename) + 1 + strlen(comment) + 1
#		 = 0 if end of archive
#
#       1   first_hdr_size (size up to and including 'extra data')
#       1   archiver version number [2.30==v4 ?  2.39==v5 ?]
#       1   minimum archiver version to extract
#       1   host OS   (0 = MSDOS, 1 = PRIMOS, 2 = UNIX, 3 = AMIGA, 4 = MAC-OS)
#		     (5 = OS/2, 6 = APPLE GS, 7 = ATARI ST, 8 = NEXT)
#		     (9 = VAX VMS)
# [text deleted]
0	short		0xea60		arj archive
#
# >>>>> ARC <<<<<  (source: Greg Roelofs roe2@midway.uchicago.edu)
#
0	string		\032\010		Arc archive
# 0	short		0x1a08			Arc archive
# 0	short		0x081a			Arc archive
#
# >>>>> LHARC/LHA <<<<<  (source: Greg Roelofs roe2@midway.uchicago.edu)
#
2	string		-lh0-			Lharc 1.x archive
2	string		-lh1-			Lharc 1.x archive
2	string		-lz4-			Lharc 1.x archive
2	string		-lz5-			Lharc 1.x archive
#	[never seen any but the last:]
2	string		-lzs-			LHa 2.x? archive [lzs]
2	string		-lh\ -		LHa 2.x? archive [lh ]
2	string		-lhd-			LHa 2.x? archive [lhd]
2	string		-lh2-			Lha 2.x? archive [lh2]
2	string		-lh3-			LHa 2.x? archive [lh3]
2	string		-lh4-			LHa 2.x? archive [lh4]
2	string		-lh5-			LHa (2.x) archive
#
# >>>>> ZIP <<<<<  (source: Greg Roelofs roe2@midway.uchicago.edu)
# [extract ver is from 1st file only]
#
0	string		PK\003\004		Zip archive
>4	string		\011			(at least v0.9 to extract)
>4	string		\012			(at least v1.0 to extract)
>4	string		\013			(at least v1.1 to extract)
>4	string		\024			(at least v2.0 to extract)
#
# >>>>> ZOO <<<<<  (source: Greg Roelofs roe2@midway.uchicago.edu)
#
# [GRR:  don't know if all of these versions exist, or if some missing...]
#0		string		ZOO 			Zoo archive
# [DH: Use GRR's alternate identifiers]
0x2a	string   \xdc\xa7\xc4\xfd
>0 string         >0          %.16s
# >4	string		1.00			(v%4s)
# >4	string		1.10			(v%4s)
# >4	string		1.20			(v%4s)
# >4	string		1.30			(v%4s)
# >4	string		1.40			(v%4s)
# >4	string		1.50			(v%4s)
# >4	string		1.60			(v%4s)
# >4	string		1.70			(v%4s)
# >4	string		1.71			(v%4s)
# >4	string		2.00			(v%4s)
# >4	string		2.01			(v%4s)
# >4	string		2.10			(v%4s)
>32	string		\001\000		(modify: v1.0+)
>32	string		\001\004		(modify: v1.4+)
>32	string		\002\000		(modify: v2.0+)
>70	string		\001\000		(extract: v1.0+)
>70	string		\002\001		(extract: v2.1+)
0		string		ZOO 			Zoo archive
# [GRR:  the following are alternate identifiers]
#0x2a	long		0xdca7c4fd		Zoo archive
#0x2a	long		0xc4fddca7		Zoo archive
#
# >>>>> HPACK <<<<<  (source: Peter Gutmann pgut1@cs.aukuni.ac.nz)
# Here's the entry from the local magic file - it's for Ultrix, the format
# may not be 100% the same as everyone else's.  Basically the ID bytes are a
# 4-byte string 'HPAK' at the start.  Anything after that is indeterminate,
# since for example if the archive is encrypted the entire thing will be one
# big block of white noise - it's only the 4-byte ID you can rely on 100%. 
# Once the ISO approves ISO 8824 and 8825 I'll use that format, which will
# provide a lot more information, but that will probably still take awhile....
#   4       string          HPAK            1,1     HPACK archive
0	string	HPAK	HPACK archive
