xref: /dragonfly/contrib/file/magic/Magdir/zip (revision 9f020288)
1#------------------------------------------------------------------------------
2# $File: zip,v 1.3 2019/07/06 19:25:06 christos Exp $
3# zip:  file(1) magic for zip files; this is not use
4# Note the version of magic in archive is currently stronger, this is
5# just an example until negative offsets are supported better
6
7# Zip Central Cirectory record
80	name		zipcd
9>0	string		PK\001\002	Zip archive data
10>>4	leshort		x		\b, made by
11>>4	use		zipversion
12>>6	leshort		x		\b, extract using at least
13>>6	use		zipversion
14>>12	ledate		x		\b, last modified %s
15>>24	lelong		>0		\b, uncompressed size %d
16>>10	leshort		x		\b, method=
17>>10	use		zipcompression
18
19# Zip known compressions
200	name		zipcompression
21>0	leshort		0		\bstore
22>0	leshort		8		\bdeflate
23>0	leshort		9		\bdeflate64
24>0	leshort		12		\bbzip2
25>0	leshort		14		\blzma
26>0	leshort		94		\bMP3
27>0	leshort		95		\bxz
28>0	leshort		96		\bJpeg
29>0	leshort		97		\bWavPack
30>0	leshort		98		\bPPMd
31>0	leshort		99		\bAES Encrypted
32>0	default		x
33>>0	leshort		x		\b[%#x]
34
35# Zip known versions
360	name		zipversion
37>0	leshort		0x09		v0.9
38>0	leshort		0x0a		v1.0
39>0	leshort		0x0b		v1.1
40>0	leshort		0x14		v2.0
41>0	leshort		0x15		v2.1
42>0	leshort		0x19		v2.5
43>0	leshort		0x1b		v2.7
44>0	leshort		0x2d		v4.5
45>0	leshort		0x2e		v4.6
46>0	leshort		0x32		v5.0
47>0	leshort		0x33		v5.1
48>0	leshort		0x34		v5.2
49>0	leshort		0x3d		v6.1
50>0	leshort		0x3e		v6.2
51>0	leshort		0x3f		v6.3
52>0	default		x
53>>0	leshort		x		v?[%#x]
54
55# Zip End Of Central Directory record
56-22	string		PK\005\006
57#>4	leshort		>1		\b, %d disks
58#>6	leshort		>1		\b, central directory disk %d
59#>8	leshort		>1		\b, %d central directories on this disk
60#>10	leshort		>1		\b, %d central directories
61#>12	lelong		x		\b, %d central directory bytes
62>(16.l)	use		zipcd
63>>20	pstring/l	>0		\b, %s
64