xref: /netbsd/external/bsd/file/dist/magic/magdir/compress (revision 4c89978f)
11b108b8bSchristos#------------------------------------------------------------------------------
2*4c89978fSchristos# $File: compress,v 1.83 2022/08/16 11:16:39 christos Exp $
31b108b8bSchristos# compress:  file(1) magic for pure-compression formats (no archives)
41b108b8bSchristos#
51b108b8bSchristos# compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc.
61b108b8bSchristos#
71b108b8bSchristos# Formats for various forms of compressed data
81b108b8bSchristos# Formats for "compress" proper have been moved into "compress.c",
91b108b8bSchristos# because it tries to uncompress it to figure out what's inside.
101b108b8bSchristos
111b108b8bSchristos# standard unix compress
121b108b8bSchristos0	string		\037\235	compress'd data
131b108b8bSchristos!:mime	application/x-compress
141b108b8bSchristos!:apple	LZIVZIVU
151b108b8bSchristos>2	byte&0x80	>0		block compressed
161b108b8bSchristos>2	byte&0x1f	x		%d bits
171b108b8bSchristos
181b108b8bSchristos# gzip (GNU zip, not to be confused with Info-ZIP or PKWARE zip archiver)
19c3ff5af2Schristos# URL: https://en.wikipedia.org/wiki/Gzip
20c3ff5af2Schristos# Reference: https://tools.ietf.org/html/rfc1952
21c3ff5af2Schristos# Update: Joerg Jenderek, Apr 2019
221b108b8bSchristos#   Edited by Chris Chittleborough <cchittleborough@yahoo.com.au>, March 2002
231b108b8bSchristos#	* Original filename is only at offset 10 if "extra field" absent
241b108b8bSchristos#	* Produce shorter output - notably, only report compression methods
251b108b8bSchristos#         other than 8 ("deflate", the only method defined in RFC 1952).
26c3ff5af2Schristos# Note: find defs -iname '*.trid.xml' -exec grep -q '<Bytes>1F8B08' {} \; -ls
27c3ff5af2Schristos# TODO:
28c3ff5af2Schristos# FBR	Blueberry FlashBack screen Record	https://www.flashbackrecorder.com/
29c3ff5af2Schristos# KPR	KOffice/Calligra KPresenter		application/x-kpresenter
30c3ff5af2Schristos# KPT	KOffice/Calligra KPresenter template?	application/x-kpresenter
31c3ff5af2Schristos# SAV	Diggles Saved Game File			http://www.innonics.com
32c3ff5af2Schristos# SAV	FarCry (demo) saved game		http://www.farcry-thegame.com
33c3ff5af2Schristos# DAT	ZOAGZIP game data format		http://en.wikipedia.org/wiki/SD_Gundam_Capsule_Fighter
34c3ff5af2Schristos0       string          \037\213
35c3ff5af2Schristos# to display gzip compressed (strength=100=2*50) before other (strength=50)?
36c3ff5af2Schristos#!:strength * 2
37c3ff5af2Schristos# no FNAME and FCOMMENT bit implies no file name/comment. That means only binary
38c3ff5af2Schristos>3	byte&0x18	=0
39c3ff5af2Schristos# For binary gzipped no ASCII text should occur
40c3ff5af2Schristos#	mcd-monu-cad.trid.xml
41c3ff5af2Schristos>>10	string		MCD			Monu-Cad Drawing, Component or Font
42c3ff5af2Schristos#>>36	string		Created\ with\ MONU-CAD
43c3ff5af2Schristos#!:mime	application/octet-stream
44c3ff5af2Schristos# http://fileformats.archiveteam.org/wiki/Monu-CAD
45c3ff5af2Schristos#	http://www.monucad.com/downloads/FullDemo-2005.EXE
46c3ff5af2Schristos#	/HANDS96.MCC	Component
47c3ff5af2Schristos#	/DEMO_DD01.MCD	Drawing
48c3ff5af2Schristos#	/MCALF020.FNT	Font
49c3ff5af2Schristos!:ext	mcc/mcd/fnt
50c3ff5af2Schristos# http://www.generalcadd.com
51c3ff5af2Schristos>>10	string		GXD			General CADD, Drawing or Component
52c3ff5af2Schristos#!:mime	application/octet-stream
53c3ff5af2Schristos#	/gxc/BUILDINGEDGE.gxc			Component
54c3ff5af2Schristos#	/gxd/HOCKETT-STPAUL-WRHSE.gxd		Drawing
55c3ff5af2Schristos#	/gxd/POWERLAND-MILL-ADD-11.gxd		Drawing		v9.1.06
56c3ff5af2Schristos!:ext	gxc/gxd
57c3ff5af2Schristos#>>>13	ubyte		0			\b, version 0
58c3ff5af2Schristos>>>13	string		09			\b, version 9
59c3ff5af2Schristos# other gzipped binary like gzipped tar, VirtualBox extension package,...
60c3ff5af2Schristos>>10	default		x		gzip compressed data
610086c5a6Schristos!:mime	application/gzip
62c3ff5af2Schristos>>>0	use	gzip-info
63c3ff5af2Schristos# size of the original (uncompressed) input data modulo 2^32
64cdf4124cSchristos>>-0	offset		>48
65c3ff5af2Schristos>>>-4	ulelong		x		\b, original size modulo 2^32 %u
66cdf4124cSchristos>>-0	offset		<48		\b, truncated
67c3ff5af2Schristos# gzipped TAR or VirtualBox extension package
68c3ff5af2Schristos#!:mime	application/x-compressed-tar
69c3ff5af2Schristos#!:mime	application/x-virtualbox-vbox-extpack
70c3ff5af2Schristos# https://www.w3.org/TR/SVG/mimereg.html
71c3ff5af2Schristos#!:mime	image/image/svg+xml-compressed
72c3ff5af2Schristos#	zlib.3.gz
73c3ff5af2Schristos#	microcode-20180312.tgz
74c3ff5af2Schristos#	tpz same as tgz
75c3ff5af2Schristos#	lua-md5_1.2-1_i386_i486.ipk	https://en.wikipedia.org/wiki/Opkg
76c3ff5af2Schristos#	Oracle_VM_VirtualBox_Extension_Pack-5.0.12-104815.vbox-extpack
77c3ff5af2Schristos!:ext	gz/tgz/tpz/ipk/vbox-extpack/svgz
78c3ff5af2Schristos# FNAME/FCOMMENT bit implies file name/comment as iso-8859-1 text
79c3ff5af2Schristos>3	byte&0x18	>0		gzip compressed data
80c3ff5af2Schristos!:mime	application/gzip
81c3ff5af2Schristos# gzipped tar, gzipped Abiword document
82c3ff5af2Schristos#!:mime	application/x-compressed-tar
83c3ff5af2Schristos#!:mime	application/x-abiword-compressed
84c3ff5af2Schristos#!:mime	image/image/svg+xml-compressed
85c3ff5af2Schristos#	kleopatra_splashscreen.svgz	gzipped .svg
86c3ff5af2Schristos!:ext	gz/tgz/tpz/zabw/svgz
87c3ff5af2Schristos>>0	use	gzip-info
88c3ff5af2Schristos# size of the original (uncompressed) input data modulo 2^32
89cdf4124cSchristos>>-0	offset		>48
90cdf4124cSchristos>>>-4	ulelong		x		\b, original size modulo 2^32 %u
91cdf4124cSchristos>>-0	offset		<48		\b, truncated
92c3ff5af2Schristos#	display information of gzip compressed files
93c3ff5af2Schristos0	name				gzip-info
94c3ff5af2Schristos#>2	byte		x		THIS iS GZIP
951b108b8bSchristos>2	byte		<8		\b, reserved method
961b108b8bSchristos>2	byte		>8		\b, unknown method
971b108b8bSchristos>3	byte		&0x01		\b, ASCII
981b108b8bSchristos>3	byte		&0x02		\b, has CRC
991b108b8bSchristos>3	byte		&0x04		\b, extra field
1001b108b8bSchristos>3	byte&0xC	=0x08
1011b108b8bSchristos>>10	string		x		\b, was "%s"
1021b108b8bSchristos>3	byte		&0x10		\b, has comment
103f5d2d52dSchristos>3	byte		&0x20		\b, encrypted
104f5d2d52dSchristos>4	ledate		>0		\b, last modified: %s
105f5d2d52dSchristos>8	byte		2		\b, max compression
106f5d2d52dSchristos>8	byte		4		\b, max speed
1071b108b8bSchristos>9	byte		=0x00		\b, from FAT filesystem (MS-DOS, OS/2, NT)
1081b108b8bSchristos>9	byte		=0x01		\b, from Amiga
1091b108b8bSchristos>9	byte		=0x02		\b, from VMS
1101b108b8bSchristos>9	byte		=0x03		\b, from Unix
1111b108b8bSchristos>9	byte		=0x04		\b, from VM/CMS
1121b108b8bSchristos>9	byte		=0x05		\b, from Atari
1131b108b8bSchristos>9	byte		=0x06		\b, from HPFS filesystem (OS/2, NT)
1141b108b8bSchristos>9	byte		=0x07		\b, from MacOS
1151b108b8bSchristos>9	byte		=0x08		\b, from Z-System
1161b108b8bSchristos>9	byte		=0x09		\b, from CP/M
1171b108b8bSchristos>9	byte		=0x0A		\b, from TOPS/20
1181b108b8bSchristos>9	byte		=0x0B		\b, from NTFS filesystem (NT)
1191b108b8bSchristos>9	byte		=0x0C		\b, from QDOS
1201b108b8bSchristos>9	byte		=0x0D		\b, from Acorn RISCOS
121c3ff5af2Schristos# size of the original (uncompressed) input data modulo 2^32
122c3ff5af2Schristos#>-4	ulelong		x		\b, original size modulo 2^32 %u
123c3ff5af2Schristos#ERROR: line 114: non zero offset 1048572 at level 1
1241b108b8bSchristos
1251b108b8bSchristos# packed data, Huffman (minimum redundancy) codes on a byte-by-byte basis
1261b108b8bSchristos0	string		\037\036	packed data
1271b108b8bSchristos!:mime	application/octet-stream
1281b108b8bSchristos>2	belong		>1		\b, %d characters originally
1291b108b8bSchristos>2	belong		=1		\b, %d character originally
1301b108b8bSchristos#
1311b108b8bSchristos# This magic number is byte-order-independent.
1321b108b8bSchristos0	short		0x1f1f		old packed data
1331b108b8bSchristos!:mime	application/octet-stream
1341b108b8bSchristos
1351b108b8bSchristos# XXX - why *two* entries for "compacted data", one of which is
1361b108b8bSchristos# byte-order independent, and one of which is byte-order dependent?
1371b108b8bSchristos#
1381b108b8bSchristos0	short		0x1fff		compacted data
1391b108b8bSchristos!:mime	application/octet-stream
1401b108b8bSchristos# This string is valid for SunOS (BE) and a matching "short" is listed
1411b108b8bSchristos# in the Ultrix (LE) magic file.
1421b108b8bSchristos0	string		\377\037	compacted data
1431b108b8bSchristos!:mime	application/octet-stream
1441b108b8bSchristos0	short		0145405		huf output
1451b108b8bSchristos!:mime	application/octet-stream
1461b108b8bSchristos
1471b108b8bSchristos# bzip2
1481b108b8bSchristos0	string		BZh		bzip2 compressed data
1491b108b8bSchristos!:mime	application/x-bzip2
150*4c89978fSchristos!:ext	bz2
1511b108b8bSchristos>3	byte		>47		\b, block size = %c00k
1521b108b8bSchristos
15399449224Schristos# bzip	a block-sorting file compressor
15499449224Schristos#	by Julian Seward <sewardj@cs.man.ac.uk> and others
15599449224Schristos0	string		BZ0		bzip compressed data
15699449224Schristos!:mime	application/x-bzip
15799449224Schristos>3	byte		>47		\b, block size = %c00k
15899449224Schristos
1591b108b8bSchristos# lzip
1601b108b8bSchristos0	string		LZIP		lzip compressed data
1611b108b8bSchristos!:mime application/x-lzip
1621b108b8bSchristos>4	byte		x		\b, version: %d
1631b108b8bSchristos
1641b108b8bSchristos# squeeze and crunch
1651b108b8bSchristos# Michael Haardt <michael@cantor.informatik.rwth-aachen.de>
1661b108b8bSchristos0	beshort		0x76FF		squeezed data,
1671b108b8bSchristos>4	string		x		original name %s
1681b108b8bSchristos0	beshort		0x76FE		crunched data,
1691b108b8bSchristos>2	string		x		original name %s
1701b108b8bSchristos0	beshort		0x76FD		LZH compressed data,
1711b108b8bSchristos>2	string		x		original name %s
1721b108b8bSchristos
1731b108b8bSchristos# Freeze
1741b108b8bSchristos0	string		\037\237	frozen file 2.1
1751b108b8bSchristos0	string		\037\236	frozen file 1.0 (or gzip 0.5)
1761b108b8bSchristos
1771b108b8bSchristos# SCO compress -H (LZH)
1781b108b8bSchristos0	string		\037\240	SCO compress -H (LZH) data
1791b108b8bSchristos
1801b108b8bSchristos# European GSM 06.10 is a provisional standard for full-rate speech
1811b108b8bSchristos# transcoding, prI-ETS 300 036, which uses RPE/LTP (residual pulse
1821b108b8bSchristos# excitation/long term prediction) coding at 13 kbit/s.
1831b108b8bSchristos#
1841b108b8bSchristos# There's only a magic nibble (4 bits); that nibble repeats every 33
1851b108b8bSchristos# bytes.  This isn't suited for use, but maybe we can use it someday.
1861b108b8bSchristos#
1871b108b8bSchristos# This will cause very short GSM files to be declared as data and
1881b108b8bSchristos# mismatches to be declared as data too!
1891b108b8bSchristos#0	byte&0xF0	0xd0		data
1901b108b8bSchristos#>33	byte&0xF0	0xd0
1911b108b8bSchristos#>66	byte&0xF0	0xd0
1921b108b8bSchristos#>99	byte&0xF0	0xd0
1931b108b8bSchristos#>132	byte&0xF0	0xd0		GSM 06.10 compressed audio
1941b108b8bSchristos
1951b108b8bSchristos# lzop from <markus.oberhumer@jk.uni-linz.ac.at>
1961b108b8bSchristos0	string		\x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a	lzop compressed data
1971b108b8bSchristos>9	beshort		<0x0940
1981b108b8bSchristos>>9	byte&0xf0	=0x00		- version 0.
1991b108b8bSchristos>>9	beshort&0x0fff	x		\b%03x,
2001b108b8bSchristos>>13	byte		1		LZO1X-1,
2011b108b8bSchristos>>13	byte		2		LZO1X-1(15),
2021b108b8bSchristos>>13	byte		3		LZO1X-999,
2031b108b8bSchristos## >>22	bedate		>0		last modified: %s,
2041b108b8bSchristos>>14	byte		=0x00		os: MS-DOS
2051b108b8bSchristos>>14	byte		=0x01		os: Amiga
2061b108b8bSchristos>>14	byte		=0x02		os: VMS
2071b108b8bSchristos>>14	byte		=0x03		os: Unix
2081b108b8bSchristos>>14	byte		=0x05		os: Atari
2091b108b8bSchristos>>14	byte		=0x06		os: OS/2
2101b108b8bSchristos>>14	byte		=0x07		os: MacOS
2111b108b8bSchristos>>14	byte		=0x0A		os: Tops/20
2121b108b8bSchristos>>14	byte		=0x0B		os: WinNT
2131b108b8bSchristos>>14	byte		=0x0E		os: Win32
2141b108b8bSchristos>9	beshort		>0x0939
2151b108b8bSchristos>>9	byte&0xf0	=0x00		- version 0.
2161b108b8bSchristos>>9	byte&0xf0	=0x10		- version 1.
2171b108b8bSchristos>>9	byte&0xf0	=0x20		- version 2.
2181b108b8bSchristos>>9	beshort&0x0fff	x		\b%03x,
2191b108b8bSchristos>>15	byte		1		LZO1X-1,
2201b108b8bSchristos>>15	byte		2		LZO1X-1(15),
2211b108b8bSchristos>>15	byte		3		LZO1X-999,
2221b108b8bSchristos## >>25	bedate		>0		last modified: %s,
2231b108b8bSchristos>>17	byte		=0x00		os: MS-DOS
2241b108b8bSchristos>>17	byte		=0x01		os: Amiga
2251b108b8bSchristos>>17	byte		=0x02		os: VMS
2261b108b8bSchristos>>17	byte		=0x03		os: Unix
2271b108b8bSchristos>>17	byte		=0x05		os: Atari
2281b108b8bSchristos>>17	byte		=0x06		os: OS/2
2291b108b8bSchristos>>17	byte		=0x07		os: MacOS
2301b108b8bSchristos>>17	byte		=0x0A		os: Tops/20
2311b108b8bSchristos>>17	byte		=0x0B		os: WinNT
2321b108b8bSchristos>>17	byte		=0x0E		os: Win32
2331b108b8bSchristos
2341b108b8bSchristos# 4.3BSD-Quasijarus Strong Compression
235c3ff5af2Schristos# https://minnie.tuhs.org/Quasijarus/compress.html
2361b108b8bSchristos0	string		\037\241	Quasijarus strong compressed data
2371b108b8bSchristos
2381b108b8bSchristos# From: Cory Dikkers <cdikkers@swbell.net>
2391b108b8bSchristos0	string		XPKF		Amiga xpkf.library compressed data
2401b108b8bSchristos0	string		PP11		Power Packer 1.1 compressed data
2411b108b8bSchristos0	string		PP20		Power Packer 2.0 compressed data,
2421b108b8bSchristos>4	belong		0x09090909	fast compression
2431b108b8bSchristos>4	belong		0x090A0A0A	mediocre compression
2441b108b8bSchristos>4	belong		0x090A0B0B	good compression
2451b108b8bSchristos>4	belong		0x090A0C0C	very good compression
2461b108b8bSchristos>4	belong		0x090A0C0D	best compression
2471b108b8bSchristos
2481b108b8bSchristos# 7-zip archiver, from Thomas Klausner (wiz@danbala.tuwien.ac.at)
249c3ff5af2Schristos# https://www.7-zip.org or DOC/7zFormat.txt
2501b108b8bSchristos#
2511b108b8bSchristos0	string		7z\274\257\047\034	7-zip archive data,
2521b108b8bSchristos>6	byte		x			version %d
2531b108b8bSchristos>7	byte		x			\b.%d
2542e1c341aSchristos!:mime	application/x-7z-compressed
255b04dc002Schristos!:ext 7z/cb7
2561b108b8bSchristos
2571b108b8bSchristos# Type: LZMA
2582c8c7e75Schristos0	lelong&0xffffff	=0x5d
2599b792cf3Schristos>12	leshort		0xff			LZMA compressed data,
260f5d2d52dSchristos!:mime	application/x-lzma
2612c8c7e75Schristos>>5	lequad		=0xffffffffffffffff	streamed
2622c8c7e75Schristos>>5	lequad		!0xffffffffffffffff	non-streamed, size %lld
2639b792cf3Schristos>12	leshort		0			LZMA compressed data,
2649b792cf3Schristos>>5	lequad		=0xffffffffffffffff	streamed
2659b792cf3Schristos>>5	lequad		!0xffffffffffffffff	non-streamed, size %lld
2661b108b8bSchristos
2671b108b8bSchristos# http://tukaani.org/xz/xz-file-format.txt
2686449c992Schristos0	ustring		\xFD7zXZ\x00		XZ compressed data, checksum
269*4c89978fSchristos!:strength * 2
270*4c89978fSchristos!:mime	application/x-xz
2716449c992Schristos>7	byte&0xf	0x0			NONE
2726449c992Schristos>7	byte&0xf	0x1			CRC32
2736449c992Schristos>7	byte&0xf	0x4			CRC64
2746449c992Schristos>7	byte&0xf	0xa			SHA-256
2756449c992Schristos
2762e1c341aSchristos# https://github.com/ckolivas/lrzip/blob/master/doc/magic.header.txt
2772e1c341aSchristos0	string		LRZI			LRZIP compressed data
2782e1c341aSchristos>4	byte		x			- version %d
2792e1c341aSchristos>5	byte		x			\b.%d
280*4c89978fSchristos>22	byte		1			\b, encrypted
2812e1c341aSchristos!:mime	application/x-lrzip
2822e1c341aSchristos
283c3ff5af2Schristos# https://fastcompression.blogspot.fi/2013/04/lz4-streaming-format-final.html
284f5d2d52dSchristos0	lelong		0x184d2204	LZ4 compressed data (v1.4+)
285f5d2d52dSchristos!:mime	application/x-lz4
286f5d2d52dSchristos# Added by osm0sis@xda-developers.com
287f5d2d52dSchristos0 	lelong		0x184c2103	LZ4 compressed data (v1.0-v1.3)
288f5d2d52dSchristos!:mime	application/x-lz4
289f5d2d52dSchristos0	lelong		0x184c2102	LZ4 compressed data (v0.1-v0.9)
290f5d2d52dSchristos!:mime	application/x-lz4
291f5d2d52dSchristos
292b04dc002Schristos# Zstandard/LZ4 skippable frames
293b04dc002Schristos# https://github.com/facebook/zstd/blob/dev/zstd_compression_format.md
294b04dc002Schristos0         lelong&0xFFFFFFF0  0x184D2A50
29555287a1bSchristos>(4.l+8)  indirect	x
296b04dc002Schristos
297b04dc002Schristos# Zstandard Dictionary ID subroutine
298b04dc002Schristos0     name        zstd-dictionary-id
299b04dc002Schristos# Single Segment = True
300b04dc002Schristos>0    byte        &0x20   \b, Dictionary ID:
301b04dc002Schristos>>0   byte&0x03   0       None
302b04dc002Schristos>>0   byte&0x03   1
303b04dc002Schristos>>>1  byte        x       %u
304b04dc002Schristos>>0   byte&0x03   2
305b04dc002Schristos>>>1  leshort     x       %u
306b04dc002Schristos>>0   byte&0x03   3
307b04dc002Schristos>>>1  lelong      x       %u
308b04dc002Schristos# Single Segment = False
309b04dc002Schristos>0    byte        ^0x20   \b, Dictionary ID:
310b04dc002Schristos>>0   byte&0x03   0       None
311b04dc002Schristos>>0   byte&0x03   1
312b04dc002Schristos>>>2  byte        x       %u
313b04dc002Schristos>>0   byte&0x03   2
314b04dc002Schristos>>>2  leshort     x       %u
315b04dc002Schristos>>0   byte&0x03   3
316b04dc002Schristos>>>2  lelong      x       %u
317b04dc002Schristos
318b04dc002Schristos# Zstandard compressed data
319b04dc002Schristos# https://github.com/facebook/zstd/blob/dev/zstd_compression_format.md
320b04dc002Schristos0     lelong       0xFD2FB522  Zstandard compressed data (v0.2)
3210086c5a6Schristos!:mime  application/zstd
322b04dc002Schristos0     lelong       0xFD2FB523  Zstandard compressed data (v0.3)
3230086c5a6Schristos!:mime  application/zstd
324b04dc002Schristos0     lelong       0xFD2FB524  Zstandard compressed data (v0.4)
3250086c5a6Schristos!:mime  application/zstd
326b04dc002Schristos0     lelong       0xFD2FB525  Zstandard compressed data (v0.5)
3270086c5a6Schristos!:mime  application/zstd
328b04dc002Schristos0     lelong       0xFD2FB526  Zstandard compressed data (v0.6)
3290086c5a6Schristos!:mime  application/zstd
330b04dc002Schristos0     lelong       0xFD2FB527  Zstandard compressed data (v0.7)
3310086c5a6Schristos!:mime  application/zstd
332b04dc002Schristos>4    use          zstd-dictionary-id
333b04dc002Schristos0     lelong       0xFD2FB528  Zstandard compressed data (v0.8+)
3340086c5a6Schristos!:mime  application/zstd
335b04dc002Schristos>4    use          zstd-dictionary-id
336b04dc002Schristos
337b04dc002Schristos# https://github.com/facebook/zstd/blob/dev/zstd_compression_format.md
338b04dc002Schristos0  lelong    0xEC30A437  Zstandard dictionary
3390086c5a6Schristos!:mime  application/x-std-dictionary
340b04dc002Schristos>4 lelong    x           (ID %u)
341b04dc002Schristos
3421b108b8bSchristos# AFX compressed files (Wolfram Kleff)
3431b108b8bSchristos2	string		-afx-		AFX compressed file data
3441b108b8bSchristos
3451b108b8bSchristos# Supplementary magic data for the file(1) command to support
3461b108b8bSchristos# rzip(1).  The format is described in magic(5).
3471b108b8bSchristos#
3481b108b8bSchristos# Copyright (C) 2003 by Andrew Tridgell.  You may do whatever you want with
3491b108b8bSchristos# this file.
3501b108b8bSchristos#
3511b108b8bSchristos0	string		RZIP		rzip compressed data
3521b108b8bSchristos>4	byte		x		- version %d
3531b108b8bSchristos>5	byte		x		\b.%d
3541b108b8bSchristos>6	belong		x		(%d bytes)
3551b108b8bSchristos
3562e1c341aSchristos0	string		ArC\x01		FreeArc archive <http://freearc.org>
3572e1c341aSchristos
3582e1c341aSchristos# Type:	DACT compressed files
3592e1c341aSchristos0	long	0x444354C3	DACT compressed data
3602e1c341aSchristos>4	byte	>-1		(version %i.
3612e1c341aSchristos>5	byte	>-1		%i.
3622e1c341aSchristos>6	byte	>-1		%i)
3632e1c341aSchristos>7	long	>0		, original size: %i bytes
3642e1c341aSchristos>15	long	>30		, block size: %i bytes
3659b792cf3Schristos
3669b792cf3Schristos# Valve Pack (VPK) files
3679b792cf3Schristos0	lelong	0x55aa1234	Valve Pak file
3689b792cf3Schristos>0x4	lelong	x		\b, version %u
3699b792cf3Schristos>0x8	lelong	x		\b, %u entries
3709b792cf3Schristos
371f5d2d52dSchristos# Snappy framing format
372c3ff5af2Schristos# https://code.google.com/p/snappy/source/browse/trunk/framing_format.txt
373f5d2d52dSchristos0	string	\377\006\0\0sNaPpY	snappy framed data
374f5d2d52dSchristos!:mime	application/x-snappy-framed
37585dc3c67Schristos
376c3ff5af2Schristos# qpress, https://www.quicklz.com/
37785dc3c67Schristos0	string	qpress10	qpress compressed data
37885dc3c67Schristos!:mime	application/x-qpress
37985dc3c67Schristos
38085dc3c67Schristos# Zlib https://www.ietf.org/rfc/rfc6713.txt
381b04dc002Schristos0	string/b	x
382b04dc002Schristos>0	beshort%31	=0
383b04dc002Schristos>>0	byte&0xf	=8
384b04dc002Schristos>>>0	byte&0x80 	=0	zlib compressed data
38585dc3c67Schristos!:mime	application/zlib
38699449224Schristos
38799449224Schristos# BWC compression
38899449224Schristos0	string		BWC
38999449224Schristos>3	byte		0	BWC compressed data
39099449224Schristos
39199449224Schristos# UCL compression
39299449224Schristos0	bequad		0x00e955434cff011a	UCL compressed data
39399449224Schristos
39499449224Schristos# Softlib archive
39599449224Schristos0	string		SLIB	Softlib archive
39699449224Schristos>4	leshort		x	\b, version %d
39799449224Schristos>6	leshort		x	(contains %d files)
39899449224Schristos
39999449224Schristos# URL:  https://github.com/lzfse/lzfse/blob/master/src/lzfse_internal.h#L276
40099449224Schristos# From: Eric Hall <eric.hall@darkart.com>
40199449224Schristos0	string	bvx-	lzfse encoded, no compression
40299449224Schristos0	string	bvx1	lzfse compressed, uncompressed tables
40399449224Schristos0	string	bvx2	lzfse compressed, compressed tables
40499449224Schristos0	string	bvxn	lzfse encoded, lzvn compressed
405cdf4124cSchristos
406cdf4124cSchristos# pcxLib.exe compression program
407cdf4124cSchristos# http://www.shikadi.net/moddingwiki/PCX_Library
408cdf4124cSchristos0	string/b	pcxLib
409cdf4124cSchristos>0x0A	string/b	Copyright\020(c)\020Genus\020Microprogramming,\020Inc.	pcxLib compressed
410