xref: /onnv-gate/usr/src/cmd/file/magic (revision 8462:6e341f5569ba)
10Sstevel@tonic-gate#
26078Sny155746# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
30Sstevel@tonic-gate# Use is subject to license terms.
40Sstevel@tonic-gate#
50Sstevel@tonic-gate# CDDL HEADER START
60Sstevel@tonic-gate#
70Sstevel@tonic-gate# The contents of this file are subject to the terms of the
83369Stz204579# Common Development and Distribution License (the "License").
93369Stz204579# You may not use this file except in compliance with the License.
100Sstevel@tonic-gate#
110Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
120Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
130Sstevel@tonic-gate# See the License for the specific language governing permissions
140Sstevel@tonic-gate# and limitations under the License.
150Sstevel@tonic-gate#
160Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
170Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
180Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
190Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
200Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
210Sstevel@tonic-gate#
220Sstevel@tonic-gate# CDDL HEADER END
230Sstevel@tonic-gate#
240Sstevel@tonic-gate# This file contains the dictionary of file format identifiers (magic strings)
250Sstevel@tonic-gate# used by file(1).  The fields of this file are as follows:
260Sstevel@tonic-gate#
270Sstevel@tonic-gate# (1) byte offset
280Sstevel@tonic-gate# (2) value type
290Sstevel@tonic-gate# (3) optional operator (= by default)
300Sstevel@tonic-gate# (4) value to match (numeric or string)
310Sstevel@tonic-gate# (5) string to be printed
320Sstevel@tonic-gate#
330Sstevel@tonic-gate# Numeric values may be decimal, octal, or hex.  Also note that the last string
340Sstevel@tonic-gate# may have one printf format specifier.  The '>' in occassional column 1's is
350Sstevel@tonic-gate# magic: it forces file(1) to continue scanning and matching additional lines.
360Sstevel@tonic-gate# The first line afterwards not so marked terminates the search.
370Sstevel@tonic-gate#
380Sstevel@tonic-gate# The entries for ELF are not needed anymore, as file(1) now uses the elf(3ELF)
390Sstevel@tonic-gate# routines to look at ELF files.  They remain, commented out, for reference.
400Sstevel@tonic-gate#
410Sstevel@tonic-gate#0	string		\177ELF		ELF
420Sstevel@tonic-gate#>4	byte		1		32-bit
430Sstevel@tonic-gate#>5	byte		1		LSB
440Sstevel@tonic-gate#>5	byte		2		MSB
450Sstevel@tonic-gate#>16	short		0		unknown type
460Sstevel@tonic-gate#>16	short		1		relocatable
470Sstevel@tonic-gate#>16	short		2		executable
480Sstevel@tonic-gate#>16	short		3		dynamic lib
490Sstevel@tonic-gate#>16	short		4		core file
500Sstevel@tonic-gate#>18	short		0		unknown machine
510Sstevel@tonic-gate#>18	short		1		WE32100
520Sstevel@tonic-gate#>18	short		2		SPARC
530Sstevel@tonic-gate#>18	short		3		80386
540Sstevel@tonic-gate#>18	short		4		M68000
550Sstevel@tonic-gate#>18	short		5		M88000
560Sstevel@tonic-gate#>18	short		6		i80486
570Sstevel@tonic-gate#>18	short		7		i860
580Sstevel@tonic-gate#>18	short		8		RS3000_BE
590Sstevel@tonic-gate#>18	short		9		UNKNOWN
600Sstevel@tonic-gate#>18	short		10		RS3000_LE
610Sstevel@tonic-gate#>18	short		11		RS6000
620Sstevel@tonic-gate#>18	short		12		UNKNOWN
630Sstevel@tonic-gate#>18	short		13		UNKNOWN
640Sstevel@tonic-gate#>18	short		14		UNKNOWN
650Sstevel@tonic-gate#>18	short		15		PA_RISC
660Sstevel@tonic-gate#>18	short		16		nCUBE
670Sstevel@tonic-gate#>18	short		17		VPP500
680Sstevel@tonic-gate#>18	short		18		SPARC32PLUS
690Sstevel@tonic-gate#>18	short		19		UNKNOWN
700Sstevel@tonic-gate#>18	short		20		PowerPC
710Sstevel@tonic-gate#>20	long		1		Version 1
720Sstevel@tonic-gate#>36	long		1		MAU Required
730Sstevel@tonic-gate257	string		ustar		USTAR tar archive
740Sstevel@tonic-gate>156	byte		88		extended format
750Sstevel@tonic-gate0	short		070701		cpio archive
760Sstevel@tonic-gate0	string		070701		ASCII cpio archive
770Sstevel@tonic-gate0	short		070702		cpio archive - CRC header
780Sstevel@tonic-gate0	string		070702		ASCII cpio archive - CRC header
790Sstevel@tonic-gate0	short		070707		cpio archive - CHR (-c) header
800Sstevel@tonic-gate0	string		070707		ASCII cpio archive - CHR (-c) header
810Sstevel@tonic-gate0	long		0177555		obsolete ar archive
820Sstevel@tonic-gate0	short		0177545		pdp11/pre System V ar archive
830Sstevel@tonic-gate0	long		0100554		apl workspace
840Sstevel@tonic-gate0	short		017037		packed data
850Sstevel@tonic-gate0	string		<ar>		System V Release 1 ar archive
860Sstevel@tonic-gate0	string		!<arch>		current ar archive
870Sstevel@tonic-gate0	short		0407		pdp11/pre System V vax executable
880Sstevel@tonic-gate>8	ushort		>0		not stripped
890Sstevel@tonic-gate>15	ubyte		>0		- version %ld
900Sstevel@tonic-gate0	short		0401		unix-rt ldp
910Sstevel@tonic-gate0	short		0405		pdp11 overlay
920Sstevel@tonic-gate0	short		0410		pdp11/pre System V vax pure executable
930Sstevel@tonic-gate>8	ushort		>0		not stripped
940Sstevel@tonic-gate>15	ubyte		>0		- version %ld
950Sstevel@tonic-gate0	short		0411		pdp11 separate I&D
960Sstevel@tonic-gate>8	ushort		>0		not stripped
970Sstevel@tonic-gate>15	ubyte		>0		- version %ld
980Sstevel@tonic-gate0	short		015001		Compiled Terminfo Entry
990Sstevel@tonic-gate# little-endian entry
1000Sstevel@tonic-gate0	short		0432		Compiled Terminfo Entry
1010Sstevel@tonic-gate0	short		0433		Curses screen image
1020Sstevel@tonic-gate0	short		0434		Curses screen image
1030Sstevel@tonic-gate0	short		0437		pdp11 kernel overlay
1040Sstevel@tonic-gate0	short		0570		vax executable
1050Sstevel@tonic-gate>12	long		>0		not stripped
1060Sstevel@tonic-gate>22	ushort		>0		- version %ld
1070Sstevel@tonic-gate0	short		0575		vax pure executable
1080Sstevel@tonic-gate>12	long		>0		not stripped
1090Sstevel@tonic-gate>22	ushort		>0		- version %ld
1100Sstevel@tonic-gate0	short		0502		basic-16 executable
1110Sstevel@tonic-gate>12	long		>0		not stripped
1120Sstevel@tonic-gate>22	ushort		>0		- version %ld
1130Sstevel@tonic-gate0	short		0503		basic-16 executable (TV)
1140Sstevel@tonic-gate>12	long		>0		not stripped
1150Sstevel@tonic-gate>22	ushort		>0		- version %ld
1160Sstevel@tonic-gate0	short		0510		x86 executable
1170Sstevel@tonic-gate>12	long		>0		not stripped
1180Sstevel@tonic-gate0	short		0511		x86 executable (TV)
1190Sstevel@tonic-gate>12	long		>0		not stripped
1200Sstevel@tonic-gate0	short		0550		3b20 executable
1210Sstevel@tonic-gate>12	long		>0		not stripped
1220Sstevel@tonic-gate>22	ushort		>0		- version %ld
1230Sstevel@tonic-gate0	short		0551		3b20 executable (TV)
1240Sstevel@tonic-gate>12	long		>0		not stripped
1250Sstevel@tonic-gate>22	ushort		>0		- version %ld
1260Sstevel@tonic-gate0	short		0560		WE32000 executable
1270Sstevel@tonic-gate>12	long		>0		not stripped
1280Sstevel@tonic-gate>18	short		^00010000	- N/A on 3b2/300 w/paging
1290Sstevel@tonic-gate>18	short		&00020000	- 32100 required
1300Sstevel@tonic-gate>18	short		&00040000	and mau hardware required
1310Sstevel@tonic-gate>20	short		0443		(target shared library)
1320Sstevel@tonic-gate>20	short		0410		(swapped)
1330Sstevel@tonic-gate>20	short		0413		(paged)
1340Sstevel@tonic-gate>22	ushort		>0		- version %ld
1350Sstevel@tonic-gate0	short		0561		WE32000 executable (TV)
1360Sstevel@tonic-gate>12	long		>0		not stripped
1370Sstevel@tonic-gate>18	short		&00020000	- 32100 required
1380Sstevel@tonic-gate>18	short		&00040000	and mau hardware required
1390Sstevel@tonic-gate>22	ushort		>0		- version %ld
1400Sstevel@tonic-gate0	short		=0512		iAPX 286 executable small model (COFF)
1410Sstevel@tonic-gate>12	long		>0		not stripped
1420Sstevel@tonic-gate>22	ushort		>0		- version %ld
1430Sstevel@tonic-gate0	short		=0522		iAPX 286 executable large model (COFF)
1440Sstevel@tonic-gate>12	long		>0		not stripped
1450Sstevel@tonic-gate>22	ushort		>0		- version %ld
1460Sstevel@tonic-gate0	short		0514		iAPX 386 executable (COFF) (deprecated)
1470Sstevel@tonic-gate>12	long		>0		not stripped
1480Sstevel@tonic-gate>22	ushort		>0		- version %ld
1490Sstevel@tonic-gate0	short		0520		mc68k executable
1500Sstevel@tonic-gate>12	long		>0		not stripped
1510Sstevel@tonic-gate0	short		0521		mc68k executable (shared)
1520Sstevel@tonic-gate>12	long		>0		not stripped
1530Sstevel@tonic-gate0	short		0522		mc68k executable (shared demand paged)
1540Sstevel@tonic-gate>12	long		>0		not stripped
1550Sstevel@tonic-gate# big-endian entries for pure executables
1560Sstevel@tonic-gate2	short		0410		pure
1570Sstevel@tonic-gate>1	byte		0		sun2 executable
1580Sstevel@tonic-gate>1	byte		1		mc68010 executable
1590Sstevel@tonic-gate>1	byte		2		mc68020 executable
1600Sstevel@tonic-gate>1	byte		3		SPARC executable
1610Sstevel@tonic-gate>0	ubyte		>077		dynamically linked
1620Sstevel@tonic-gate# little-endian entries for pure executables
1630Sstevel@tonic-gate2	short		04001		pure
1640Sstevel@tonic-gate>1	byte		0		sun2 executable
1650Sstevel@tonic-gate>1	byte		1		mc68010 executable
1660Sstevel@tonic-gate>1	byte		2		mc68020 executable
1670Sstevel@tonic-gate>1	byte		3		SPARC executable
1680Sstevel@tonic-gate>0	ubyte		>077		dynamically linked
1690Sstevel@tonic-gate# big-endian entries for impure executables
1700Sstevel@tonic-gate2	short		0407		impure
1710Sstevel@tonic-gate>1	byte		0		sun2 executable
1720Sstevel@tonic-gate>1	byte		1		mc68010 executable
1730Sstevel@tonic-gate>1	byte		2		mc68020 executable
1740Sstevel@tonic-gate>1	byte		3		SPARC executable
1750Sstevel@tonic-gate>0	ubyte		>077		dynamically linked
1760Sstevel@tonic-gate# little-endian entries for impure executables
1770Sstevel@tonic-gate2	short		03401		impure
1780Sstevel@tonic-gate>1	byte		0		sun2 executable
1790Sstevel@tonic-gate>1	byte		1		mc68010 executable
1800Sstevel@tonic-gate>1	byte		2		mc68020 executable
1810Sstevel@tonic-gate>1	byte		3		SPARC executable
1820Sstevel@tonic-gate>0	ubyte		>077		dynamically linked
1830Sstevel@tonic-gate# big-endian entries for Sun demand paged executables
1840Sstevel@tonic-gate2	short		0413		Sun demand paged
1850Sstevel@tonic-gate>1	byte		0		sun2 executable
1860Sstevel@tonic-gate>1	byte		1		mc68010 executable
1870Sstevel@tonic-gate>1	byte		2		mc68020 executable
1880Sstevel@tonic-gate>1	byte		3		SPARC executable
1890Sstevel@tonic-gate>0	ubyte		>077		dynamically linked
1900Sstevel@tonic-gate# little-endian entries for Sun demand paged executables
1910Sstevel@tonic-gate2	short		05401		Sun demand paged
1920Sstevel@tonic-gate>1	byte		0		sun2 executable
1930Sstevel@tonic-gate>1	byte		1		mc68010 executable
1940Sstevel@tonic-gate>1	byte		2		mc68020 executable
1950Sstevel@tonic-gate>1	byte		3		SPARC executable
1960Sstevel@tonic-gate>0	ubyte		>077		dynamically linked
1970Sstevel@tonic-gate0	short		0x8001		Adobe PostScript Type 1 binary font (PFB)
1980Sstevel@tonic-gate0	short		0x0180		Adobe PostScript Type 1 binary font (PFB)
1990Sstevel@tonic-gate0	long		0x00010000	TrueType font file version 1.0 (TTF)
2000Sstevel@tonic-gate0	long		0x00000100	TrueType font file version 1.0 (TTF)
2010Sstevel@tonic-gate0	long		0xf00000ff	extended accounting file
2020Sstevel@tonic-gate# little-endian entry
2030Sstevel@tonic-gate0	long		0xff0000f0	extended accounting file
2040Sstevel@tonic-gate0	byte		0x80		8086 relocatable (Microsoft)
2050Sstevel@tonic-gate0	byte		0xf0		MS-DOS library
2060Sstevel@tonic-gate0	short		0xff65		x.out
2070Sstevel@tonic-gate>2	string		__.SYMDEF	randomized
2080Sstevel@tonic-gate>0	byte		x		archive
2090Sstevel@tonic-gate0	short		0x206		Microsoft a.out
2100Sstevel@tonic-gate>0x1e	short		&0x10		overlay
2110Sstevel@tonic-gate>0x1e	short		&0x2		separate
2120Sstevel@tonic-gate>0x1e	short		&0x4		pure
2130Sstevel@tonic-gate>0x1e	short		&0x800		segmented
2140Sstevel@tonic-gate>0x1e	short		&0x400		standalone
2150Sstevel@tonic-gate>0x1e	short		&0x8		fixed-stack
2160Sstevel@tonic-gate>0x1c	byte		&0x80		byte-swapped
2170Sstevel@tonic-gate>0x1c	byte		&0x40		word-swapped
2180Sstevel@tonic-gate>0x10	long		>0		not-stripped
2190Sstevel@tonic-gate>0x1e	short		^0xc000		pre-SysV
2200Sstevel@tonic-gate>0x1c	byte		&0x4		86
2210Sstevel@tonic-gate>0x1c	byte		&0x9		286
2220Sstevel@tonic-gate>0x1c	byte		&0xa		386
2230Sstevel@tonic-gate>0x1e	short		&0x1		executable
2240Sstevel@tonic-gate>0x1e	short		^0x1		object file
2250Sstevel@tonic-gate>0x1e	short		&0x40		Large Text
2260Sstevel@tonic-gate>0x1e	short		&0x20		Large Data
2270Sstevel@tonic-gate>0x1e	short		&0x120		Huge Objects Enabled
2280Sstevel@tonic-gate0	short		0x10b		VAX demand load format a.out object file
2290Sstevel@tonic-gate>0x10	long		>0		not stripped
2300Sstevel@tonic-gate0	short		0x140		old Microsoft 8086 x.out
2310Sstevel@tonic-gate>0x3	byte		&0x4		separate
2320Sstevel@tonic-gate>0x3	byte		&0x2		pure
2330Sstevel@tonic-gate>0	byte		&0x1		executable
2340Sstevel@tonic-gate>0	byte		^0x1		relocatable
2350Sstevel@tonic-gate>0x14	long		>0		not stripped
2360Sstevel@tonic-gate0	long		0x10b		VAX demand load format a.out object file
2370Sstevel@tonic-gate>0x10	long		>0		not stripped
2380Sstevel@tonic-gate0	long		0x140		old Microsoft 8086 x.out
2390Sstevel@tonic-gate>0x3	byte		&0x4		separate
2400Sstevel@tonic-gate>0x3	byte		&0x2		pure
2410Sstevel@tonic-gate>0	byte		&0x1		executable
2420Sstevel@tonic-gate>0	byte		^0x1		relocatable
2430Sstevel@tonic-gate>0x14	long		>0		not stripped
2440Sstevel@tonic-gate0	long		0xe807		object file (z8000 a.out)
2450Sstevel@tonic-gate0	long		0xe808		pure object file (z8000 a.out)
2460Sstevel@tonic-gate0	long		0xe809		separate object file (z8000 a.out)
2470Sstevel@tonic-gate0	long		0xe805		overlay object file (z8000 a.out)
2480Sstevel@tonic-gate0	long		0x178		Bell 5.0 executable
2490Sstevel@tonic-gate2	short		0410		Sun read-only text executable
2500Sstevel@tonic-gate>2	short		0407		Sun old executable
2510Sstevel@tonic-gate>1	byte		3		(SPARC)
2520Sstevel@tonic-gate>1	byte		2		(68020)
2530Sstevel@tonic-gate>1	byte		1		(68010)
2540Sstevel@tonic-gate>1	byte		0		(Sun2)
2550Sstevel@tonic-gate0	short		0143561		byte-swapped cpio archive
2560Sstevel@tonic-gate0	long		0101555		PDP-11 single precision APL workspace
2570Sstevel@tonic-gate0	long		0101554		PDP-11 double precision APL workspace
2580Sstevel@tonic-gate0	long		0101557		VAX single precision APL workspace
2590Sstevel@tonic-gate0	long		0101556		VAX double precision APL workspace
2600Sstevel@tonic-gate0	short		017437		old packed data
2610Sstevel@tonic-gate0	string		\037\036	packed data
2620Sstevel@tonic-gate0	string		\377\037	compacted data
2630Sstevel@tonic-gate0	string		\037\235	compressed data
2640Sstevel@tonic-gate>2	byte&0x80	>0		block compressed
2650Sstevel@tonic-gate>2	byte&0x1f	x		%d bits
2660Sstevel@tonic-gate0	string		\037\213	gzip compressed data
2670Sstevel@tonic-gate>2	byte		8		- deflate method
2680Sstevel@tonic-gate>3	byte		&0x1		, ascii
2690Sstevel@tonic-gate>3	byte		&0x2		, continuation
2700Sstevel@tonic-gate>3	byte		&0x4		, extra field
2710Sstevel@tonic-gate>3	byte		&0x8		, original file name
2720Sstevel@tonic-gate>3	byte		&0x10		, comment
2730Sstevel@tonic-gate>3	byte		&0x20		, encrypted
2740Sstevel@tonic-gate>8	byte		2		, max compression
2750Sstevel@tonic-gate>8	byte		4		, max speed
2760Sstevel@tonic-gate0	string		!<arch>\n__.SYMDEF	archive random library
2770Sstevel@tonic-gate0	long		0x1010101	MMDF mailbox
2780Sstevel@tonic-gate0	string		<!OPS		Interleaf ASCII document
2790Sstevel@tonic-gate24	string		SunGKS		SunGKS
2800Sstevel@tonic-gate# version number follows, in the form m.n
2810Sstevel@tonic-gate>0	string		GKSM		Metafile
2820Sstevel@tonic-gate0	string		GKSM		GKS Metafile
2830Sstevel@tonic-gate# version number follows, in the form <!OPS, Version n.n>
2840Sstevel@tonic-gate0	string		%!PS-AdobeFont	Adobe PostScript ASCII font (PFA)
2850Sstevel@tonic-gate0	string		%!		PostScript document
2860Sstevel@tonic-gate>2	string		PS-Adobe	 conforming to level
2870Sstevel@tonic-gate>10	string		-1.0		 1.0
2880Sstevel@tonic-gate>10	string		-2.0		 2.0
2890Sstevel@tonic-gate>10	string		-3.0		 3.0
2900Sstevel@tonic-gate# version ID follows, in the form PS-Adobe-nn
2910Sstevel@tonic-gate0	string		Interpress/Xerox	Interpress document
2920Sstevel@tonic-gate# version ID follows, in the form /n.n
2930Sstevel@tonic-gate0	string		StartFontMetrics	Adobe font metrics
2940Sstevel@tonic-gate0	string		StartFont	Adobe font bits
2950Sstevel@tonic-gate0	long		0x137A2944	NeWS bitmap font
2960Sstevel@tonic-gate0	long		0x137A2947	NeWS font family
2970Sstevel@tonic-gate8	long		0x137A2B45	X11/NeWS bitmap font
2980Sstevel@tonic-gate8	long		0x137A2B48	X11/NeWS font family
2990Sstevel@tonic-gate# snoop files are always big-endian
3000Sstevel@tonic-gate# big-endian entries, with ullong equivalent of string "snoop"
3010Sstevel@tonic-gate0	ullong		0x736e6f6f70000000	Snoop capture file
3020Sstevel@tonic-gate>8	long		>0		- version %ld
3030Sstevel@tonic-gate# little-endian entries, with ullong equivalent of string "snoop"
3040Sstevel@tonic-gate0	ullong		0x000000706f6f6e73	Snoop capture file
3050Sstevel@tonic-gate>11	long		>0		- version %ld
3060Sstevel@tonic-gate0	short		0436		vfont definition
3070Sstevel@tonic-gate0	string		<MakerFile	Frame Maker document
3080Sstevel@tonic-gate0	string		<MIFFile	Frame Maker MIF file
3090Sstevel@tonic-gate0	string		<MML		Frame Maker MML file
3100Sstevel@tonic-gate0	string		<BookFile	Frame Maker book file
3110Sstevel@tonic-gate# Audio files are always big-endian so there are two sets of tables here.
3120Sstevel@tonic-gate# The CPU endian architecture is determined via the ordering of the first 4 bytes
3130Sstevel@tonic-gate# (the string ".snd"). The tables below have this value represented as a single
3140Sstevel@tonic-gate# 4 byte long. If the architecture is big-endian the %d token can be used for
3150Sstevel@tonic-gate# interpreting the sampling rate.
3160Sstevel@tonic-gate# Since %d can't be done on the data for little endian machines the limitation
3170Sstevel@tonic-gate# is that sampling rates not included in the x86 entries will not be recognized.
3180Sstevel@tonic-gate#
3190Sstevel@tonic-gate# big-endian entries
3200Sstevel@tonic-gate#
3210Sstevel@tonic-gate0	long		0x2e736e64	audio data:
3220Sstevel@tonic-gate>12	long		1		8-bit u-law,
3230Sstevel@tonic-gate>12	long		2		8-bit linear PCM,
3240Sstevel@tonic-gate>12	long		3		16-bit linear PCM,
3250Sstevel@tonic-gate>12	long		4		24-bit linear PCM,
3260Sstevel@tonic-gate>12	long		5		32-bit linear PCM,
3270Sstevel@tonic-gate>12	long		6		32-bit floating point,
3280Sstevel@tonic-gate>12	long		7		64-bit floating point,
3290Sstevel@tonic-gate>12	long		23		compressed (4-bit G.721 ADPCM),
3300Sstevel@tonic-gate>12	long		24		compressed (8-bit G.722 ADPCM),
3310Sstevel@tonic-gate>12	long		25		compressed (3-bit G.723 ADPCM),
3320Sstevel@tonic-gate>12	long		26		compressed (5-bit G.723 ADPCM),
3330Sstevel@tonic-gate>12	long		27		8-bit A-law,
3340Sstevel@tonic-gate>20	long		1		mono,
3350Sstevel@tonic-gate>20	long		2		stereo,
3360Sstevel@tonic-gate>20	long		4		quad,
3370Sstevel@tonic-gate>16	long		x		%d Hz
3380Sstevel@tonic-gate#
3390Sstevel@tonic-gate# little-endian entries
3400Sstevel@tonic-gate#
3410Sstevel@tonic-gate0	long		0x646e732e	audio data:
3420Sstevel@tonic-gate>12	long		0x01000000	8-bit u-law,
3430Sstevel@tonic-gate>12	long		0x02000000	8-bit linear PCM,
3440Sstevel@tonic-gate>12	long		0x03000000	16-bit linear PCM,
3450Sstevel@tonic-gate>12	long		0x04000000	24-bit linear PCM,
3460Sstevel@tonic-gate>12	long		0x05000000	32-bit linear PCM,
3470Sstevel@tonic-gate>12	long		0x06000000	32-bit floating point,
3480Sstevel@tonic-gate>12	long		0x07000000	64-bit floating point,
3490Sstevel@tonic-gate>12	long		0x17000000	compressed (4-bit G.721 ADPCM),
3500Sstevel@tonic-gate>12	long		0x18000000	compressed (8-bit G.722 ADPCM),
3510Sstevel@tonic-gate>12	long		0x19000000	compressed (3-bit G.723 ADPCM),
3520Sstevel@tonic-gate>12	long		0x1a000000	compressed (5-bit G.723 ADPCM),
3530Sstevel@tonic-gate>12	long		0x1b000000	8-bit A-law,
3540Sstevel@tonic-gate>20	long		0x01000000	mono,
3550Sstevel@tonic-gate>20	long		0x02000000	stereo,
3560Sstevel@tonic-gate>20	long		0x04000000	quad,
3570Sstevel@tonic-gate>16	long		0x401f0000	8000 Hz
3580Sstevel@tonic-gate>16	long		0x80250000	9600 Hz
3590Sstevel@tonic-gate>16	long		0x112b0000	11025 Hz
3600Sstevel@tonic-gate>16	long		0x803e0000	16000 Hz
3610Sstevel@tonic-gate>16	long		0xd4490000	18900 Hz
3620Sstevel@tonic-gate>16	long		0x22560000	22050 Hz
3630Sstevel@tonic-gate>16	long		0x007d0000	32000 Hz
3640Sstevel@tonic-gate>16	long		0xa8930000	37800 Hz
3650Sstevel@tonic-gate>16	long		0x44ac0000	44100 Hz
3660Sstevel@tonic-gate>16	long		0x80bb0000	48000 Hz
3670Sstevel@tonic-gate# .wav files are always little-endian
3680Sstevel@tonic-gate# .wav big-endian entries, starting with long value for the string "RIFF"
3690Sstevel@tonic-gate0	long		0x52494646	audio data:
3700Sstevel@tonic-gate>34	short		0x0800		8-bit
3710Sstevel@tonic-gate>34	short		0x1000		16-bit
3720Sstevel@tonic-gate>20	short		0x0100		linear PCM,
3730Sstevel@tonic-gate>20	short		0x0200		MS ADPCM,
3740Sstevel@tonic-gate>20	short		0x0600		A-law,
3750Sstevel@tonic-gate>20	short		0x0700		u-law,
3760Sstevel@tonic-gate>20	short		0x1100		DVI ADPCM,
3770Sstevel@tonic-gate>22	short		0x0100		mono
3780Sstevel@tonic-gate>22	short		0x0200		stereo
3790Sstevel@tonic-gate# .wav little-endian entries, starting with long value for the string "RIFF"
3800Sstevel@tonic-gate0	long		0x46464952	audio data:
3810Sstevel@tonic-gate>34	short		0x0008		8-bit
3820Sstevel@tonic-gate>34	short		0x0010		16-bit
3830Sstevel@tonic-gate>20	short		0x0001		linear PCM,
3840Sstevel@tonic-gate>20	short		0x0002		MS ADPCM,
3850Sstevel@tonic-gate>20	short		0x0006		A-law,
3860Sstevel@tonic-gate>20	short		0x0007		u-law,
3870Sstevel@tonic-gate>20	short		0x0011		DVI ADPCM,
3880Sstevel@tonic-gate>22	short		0x0001		mono
3890Sstevel@tonic-gate>22	short		0x0002		stereo
3900Sstevel@tonic-gate# .aiff files are always big-endian
3910Sstevel@tonic-gate# .aiff big-endian entries, starting with long value for the string "FORM"
3920Sstevel@tonic-gate0	long		0x464f524d	audio data:
3930Sstevel@tonic-gate>26	short		0x0008		8-bit linear PCM,
3940Sstevel@tonic-gate>26	short		0x0010		16-bit linear PCM,
3950Sstevel@tonic-gate>20	short		0x0001		mono
3960Sstevel@tonic-gate>20	short		0x0002		stereo
3970Sstevel@tonic-gate# .aiff little-endian entries, starting with long value for the string "FORM"
3980Sstevel@tonic-gate0	long		0x4d524f46	audio data:
3990Sstevel@tonic-gate>26	short		0x0800		8-bit linear PCM,
4000Sstevel@tonic-gate>26	short		0x1000		16-bit linear PCM,
4010Sstevel@tonic-gate>20	short		0x0100		mono
4020Sstevel@tonic-gate>20	short		0x0200		stereo
4030Sstevel@tonic-gate# .mid files are always big-endian
4040Sstevel@tonic-gate# .mid big-endian entries, starting with long value for the string "MThd"
4050Sstevel@tonic-gate0	long		0x4d546864	MIDI data:
4060Sstevel@tonic-gate>8	short		x		type %u,
4070Sstevel@tonic-gate>10	short		x		%u track(s)
4080Sstevel@tonic-gate# .mid little-endian entry (the string "MThd")
4090Sstevel@tonic-gate# can't translate big-endian type and track information
4100Sstevel@tonic-gate0	long		0x6468544d	MIDI data
4110Sstevel@tonic-gate#
4120Sstevel@tonic-gate0	short		0x1010		PEX Binary Archive
4130Sstevel@tonic-gate# rasterfiles are big-endian
4140Sstevel@tonic-gate# big-endian rasterfile entries
4150Sstevel@tonic-gate0	long		0x59a66a95	rasterfile,
4160Sstevel@tonic-gate>4	long		>0		%ld x
4170Sstevel@tonic-gate>8	long		>0		%ld x
4180Sstevel@tonic-gate>12	long		>0		%ld
4190Sstevel@tonic-gate>20	long		0		old format image
4200Sstevel@tonic-gate>20	long		1		standard format image
4210Sstevel@tonic-gate>20	long		2		run-length byte encoded image
4220Sstevel@tonic-gate>20	long		3		XRGB or RGB format image
4230Sstevel@tonic-gate>20	long		4		tiff format image
4240Sstevel@tonic-gate>20	long		5		iff (TAAC format) image
4250Sstevel@tonic-gate>20	long		0xffff		experimental format image
4260Sstevel@tonic-gate# little-endian rasterfile entries
4270Sstevel@tonic-gate# cannot translate resolution stored as big-endian longs
4280Sstevel@tonic-gate0	long		0x956aa659	rasterfile,
4290Sstevel@tonic-gate>23	long		0		old format image
4300Sstevel@tonic-gate>23	long		1		standard format image
4310Sstevel@tonic-gate>23	long		2		run-length byte encoded image
4320Sstevel@tonic-gate>23	long		3		XRGB or RGB format image
4330Sstevel@tonic-gate>23	long		4		tiff format image
4340Sstevel@tonic-gate>23	long		5		iff (TAAC format) image
4350Sstevel@tonic-gate>20	long		0xffff		experimental format image
4360Sstevel@tonic-gate0	long		0x884f5053	Interleaf fast-saved document
4370Sstevel@tonic-gate0	long		0x2a535441	Aster*x
4380Sstevel@tonic-gate>7	long		0x574f5244		Words Document
4390Sstevel@tonic-gate>7	long		0x47524150		Graphic
4400Sstevel@tonic-gate>7	long		0x53505245		Spreadsheet
4410Sstevel@tonic-gate>7	long		0x4d414352		Macro
4420Sstevel@tonic-gate0	long		0x32323738	Aster*x Version 2
4430Sstevel@tonic-gate>29	byte		0x36			Words Document
4440Sstevel@tonic-gate>29	byte		0x35			Graphic
4450Sstevel@tonic-gate>29	byte		0x32			Spreadsheet
4460Sstevel@tonic-gate>29	byte		0x38			Macro
4470Sstevel@tonic-gate4	string		pgscriptver	IslandWrite document
4480Sstevel@tonic-gate13	string		DrawFile	IslandDraw document
4490Sstevel@tonic-gate0	string		P1		PBM ascii file
4500Sstevel@tonic-gate0	string		P2		PGM ascii file
4510Sstevel@tonic-gate0	string		P3		PPM ascii file
4520Sstevel@tonic-gate0	string		P4		PBM raw file
4530Sstevel@tonic-gate0	string		P5		PGM raw file
4540Sstevel@tonic-gate0	string		P6		PPM raw file
4550Sstevel@tonic-gate0	string		\115\115	TIFF file, big-endian
4560Sstevel@tonic-gate0	string		\111\111	TIFF file, little-endian
4570Sstevel@tonic-gate0	string		GIF87a		GIF file, v87
4580Sstevel@tonic-gate0	string		GIF89a		GIF file, v89
4590Sstevel@tonic-gate0	string		\377\330\377\340	JPEG file
4600Sstevel@tonic-gate0	string		\377\330\377\341	JPEG file
4610Sstevel@tonic-gate0	string		\377\330\377\356	JPG file
4620Sstevel@tonic-gate8	string		ILBM		IFF ILBM file
4630Sstevel@tonic-gate0	string		\312\376\272\276	java class file
4640Sstevel@tonic-gate36	string		acsp	Kodak Color Management System, ICC Profile
4650Sstevel@tonic-gate0	string		%PDF		Adobe Portable Document Format (PDF)
4660Sstevel@tonic-gate>4	string		-1.0		v1.0
4670Sstevel@tonic-gate>4	string		-1.1		v1.1
4680Sstevel@tonic-gate>4	string		-1.2		v1.2
4690Sstevel@tonic-gate>4	string		-1.3		v1.3
4700Sstevel@tonic-gate>4	string		-1.4		v1.4
4710Sstevel@tonic-gate>4	string		-1.5		v1.5
4720Sstevel@tonic-gate0	string		<html		html document
4730Sstevel@tonic-gate0	string		<HTML		html document
4740Sstevel@tonic-gate0	string		<Html		html document
4750Sstevel@tonic-gate0	string		<!doctype HTML	html document
4760Sstevel@tonic-gate0	string		<!doctype Html	html document
4770Sstevel@tonic-gate0	string		<!doctype html	html document
4780Sstevel@tonic-gate0	string		<!DOCTYPE HTML	html document
4790Sstevel@tonic-gate0	string		<!DOCTYPE Html	html document
4800Sstevel@tonic-gate0	string		<!DOCTYPE html	html document
4810Sstevel@tonic-gate0	string		<!Doctype HTML	html document
4820Sstevel@tonic-gate0	string		<!Doctype Html	html document
4830Sstevel@tonic-gate0	string		<!Doctype html	html document
4840Sstevel@tonic-gate0	string		<head		html document
4850Sstevel@tonic-gate0	string		<HEAD		html document
4860Sstevel@tonic-gate0	string		<Head		html document
4870Sstevel@tonic-gate0	string		<title		html document
4880Sstevel@tonic-gate0	string		<TITLE		html document
4890Sstevel@tonic-gate0	string		<Title		html document
4900Sstevel@tonic-gate0	string		<?xml		XML document
4910Sstevel@tonic-gate0	string		<?XML		XML document
4920Sstevel@tonic-gate0	string		<?Xml		XML document
4930Sstevel@tonic-gate0	string		\0211PNG	PNG image data
4940Sstevel@tonic-gate0	string		.RMF		RealMedia file
4950Sstevel@tonic-gate0	string		FlAsH-aRcHiVe	Flash Archive
4960Sstevel@tonic-gate>13	string		-1.0		 1.0
4970Sstevel@tonic-gate>13	string		-2.0		 2.0
4980Sstevel@tonic-gate38	string		application/vnd.sun.xml.writer	StarOffice 7 Text Document
4990Sstevel@tonic-gate38	string		application/vnd.sun.xml.calc	StarOffice 7 Spreadsheet
5000Sstevel@tonic-gate38	string		application/vnd.sun.xml.draw	StarOffice 7 Drawing
5010Sstevel@tonic-gate38	string		application/vnd.sun.xml.impress	StarOffice 7 Presentation
5020Sstevel@tonic-gate38	string		application/vnd.sun.xml.math	StarOffice 7 Formula
5030Sstevel@tonic-gate38	string		application/vnd.oasis.opendocument.chart	OpenDocument Chart
5040Sstevel@tonic-gate38	string		application/vnd.oasis.opendocument.database	OpenDocument Database
5050Sstevel@tonic-gate38	string		application/vnd.sun.xml.base			OpenDocument Database
5060Sstevel@tonic-gate38	string		application/vnd.oasis.opendocument.formula	OpenDocument Formula
5070Sstevel@tonic-gate38	string		application/vnd.oasis.opendocument.image	OpenDocument Image
5080Sstevel@tonic-gate38	string		application/vnd.oasis.opendocument.text-web	HTML Document Template
5090Sstevel@tonic-gate38	string		application/vnd.oasis.opendocument.text-	OpenDocument
5100Sstevel@tonic-gate>78	string		template						Text Template
5110Sstevel@tonic-gate>78	string		master							Master Document
5120Sstevel@tonic-gate38	string		application/vnd.oasis.opendocument.text		OpenDocument Text
5130Sstevel@tonic-gate38	string		application/vnd.oasis.opendocument.graphics	OpenDocument Drawing
5140Sstevel@tonic-gate>81	string		-template						Template
5150Sstevel@tonic-gate38	string		application/vnd.oasis.opendocument.presentation	OpenDocument Presentation
5160Sstevel@tonic-gate>85	string		-template						Template
5170Sstevel@tonic-gate38	string		application/vnd.oasis.opendocument.spreadsheet	OpenDocument Spreadsheet
5180Sstevel@tonic-gate>84	string		-template						Template
5190Sstevel@tonic-gate0	string		PK\003\004	ZIP archive
5200Sstevel@tonic-gate0	string		MZ		DOS executable (EXE)
5210Sstevel@tonic-gate0	string		LZ		DOS built-in
5220Sstevel@tonic-gate0	byte		0xe9		DOS executable (COM)
5230Sstevel@tonic-gate0	byte		0xeb		DOS executable (COM)
524*8462SApril.Chin@Sun.COM0	string		\013\023\010\000	ksh compiled shell script executable
5250Sstevel@tonic-gate24	long		60012		ufsdump archive file
5260Sstevel@tonic-gate0	string		TZif		zoneinfo timezone data file
5270Sstevel@tonic-gate0	string		BZh		bzip2 compressed data
5280Sstevel@tonic-gate>3	byte		>47		, block size = %c00k
5290Sstevel@tonic-gate0	string		SUNWcpch	Sun C compiler precompiled header
5300Sstevel@tonic-gate0	string		SUNWCpch	Sun C++ compiler precompiled header
5310Sstevel@tonic-gate0	string		\043\040PaCkAgE\040DaTaStReAm	package datastream
5320Sstevel@tonic-gate0	short		0xcff1		CTF data file
5330Sstevel@tonic-gate0	string		\177DOF		DTrace DOF data file
5340Sstevel@tonic-gate0	string		\177FCF		fmd(1M) checkpoint file
5350Sstevel@tonic-gate0	string		EFT\0		Fault tree file,
5360Sstevel@tonic-gate>4	ushort		x		v%u
5370Sstevel@tonic-gate>6	ushort		x		rev %u,
5380Sstevel@tonic-gate>8	ushort		x		from esc v%u
5390Sstevel@tonic-gate>10	ushort		x		rev %u
540437Smws0	string		_SM_		DMTF SMBIOS image
541437Smws>6	byte		x		version %u
542437Smws>7	byte		x		.%u
5433369Stz2045790	byte		0x11		Solaris Audit File
5443369Stz2045790	byte		0x78		Solaris Audit File
5454027Smmusante# ZFS send stream entries
5464027Smmusante8	ullong		0x00000002f5bacbac	ZFS snapshot stream
5474027Smmusante# little endian stream
5484027Smmusante8	ullong		0xaccbbaf502000000	ZFS snapshot stream
5496078Sny155746
5506078Sny155746
5516078Sny155746# Video files
5526078Sny1557462	string		\001\272\041	MPEG Movie file
5536078Sny1557460	string		\377\375	MPEG-1 Audio Layer 2
5546078Sny1557460	string		\377\373	MPEG-1 Audio Layer 3
5556078Sny1557460	string		\377\372	MPEG-1 Audio Layer 3
5566078Sny1557460	string		\111\104\063	MPEG-1 Layer 3 with ID3v2
5576078Sny155746
5586078Sny155746# AVI and GVI files
5596078Sny15574620	string	hdrlavih	RIFF Avi Video
5606078Sny155746>36	ulong	>0		%u Max Bps,
5616078Sny155746>64	ushort	x		%u X
5626078Sny155746>68	ushort	x		%u,
5636078Sny155746>48	ulong	x		%u frames
5646078Sny155746
5656078Sny15574620	string	goog		RIFF gvi
5666078Sny155746>88	ulong	>0		%u Max Bps
5676078Sny155746>116	ushort	x		%u X
5686078Sny155746>120	ushort	x		%u,
5696078Sny155746>100	ulong	x		%u frames
5706078Sny155746
5716078Sny155746# JPEG 2000 - jp2 image file.
5726078Sny1557463	string		\014\152\120\040\040	JPEG 2000 Image file
5736078Sny155746
5746078Sny155746# iso 9660 CD-ROM image and El Torito Bootable standard
5756078Sny15574632769	string		CD\0		ISO 9660 filesystem image
5766078Sny155746>34823	string		EL\040TORITO	- El Torito
5776078Sny155746
5786078Sny155746# Palm Pilot files .pdb and .prc of some type.
5796078Sny1557460x3c	string	TEXtREAd		Palm DOC file
5806078Sny1557460x3c	string	SDocSilX		iSilo 3 Doc file for PalmPilot
5816078Sny1557460x3c	string	applSil			iSilo Application file
5826078Sny1557460x3c	string	appl			Palm Pilot Application
5836078Sny1557460x3c	string	ToGoToGo		iSilo Doc file for Palm Pilot
5846078Sny155746
5856078Sny155746#SGI files with .rgb extention
5866078Sny1557460	string	\001\332			SGI Image data,
5876078Sny155746>2	byte	1			RLE,
5886078Sny155746>2	byte	0			Verbatim,
5896078Sny155746>5	ubyte	x			%u-D
5906078Sny155746>7	ubyte	x			%u x
5916078Sny155746>9	ubyte	x			%u,
5926078Sny155746>11	ubyte	x			%u channel(s)
5936078Sny155746
5946078Sny155746# MS Documents. Not much info available.
5956078Sny1557460	string	\320\317\021\340\241\261\032\341	Microsoft
5966078Sny155746>546	string	bjbj					Word
5976078Sny155746>0	byte	<0					Document
5986078Sny1557460	string	{\\rtf		Microsoft Rich Text Format Document
5996078Sny155746
6006078Sny155746# mp4 media format with different media files embedded in it
6016078Sny1557464	string	ftyp		MPEG-4
6026078Sny155746>8	string	isom		Base Media v1 [IS0 14496-12:2003]
6036078Sny155746>8	string	iso2		Base Media v2 [ISO 14496-12:2005]
6046078Sny155746>8	string	m4a\040		Apple iTunes AAC-LC (.M4A) Audio
6056078Sny155746>8	string	m4v\040		Apple iTunes (.M4V) Video
6066078Sny155746>8	string	qt		Apple QuickTime (.MOV/QT)
6076078Sny155746>8	string	jp2		JPEG 2000 Image
6086078Sny155746>8	string	jpm		JPEG 2000 Compound Image (.JPM) [ISO 15444-6]
6096078Sny155746>8	string	jpx		JPEG 2000 w/ extensions (.JPX) [ISO 15444-2]
6106078Sny155746>8	string	mp42		v2 [ISO 14496-14]
6116078Sny1557464	string	moov		QuickTime MOV file
612