aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/gzip/gzip.h
blob: 1713a26c3328d24cd886ed3fbc32c368ad23d45a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
 * gzip header fields
 */
enum
{
	GZMAGIC1	= 0x1f,
	GZMAGIC2	= 0x8b,

	GZDEFLATE	= 8,

	GZFTEXT		= 1 << 0,		/* file is text */
	GZFHCRC		= 1 << 1,		/* crc of header included */
	GZFEXTRA	= 1 << 2,		/* extra header included */
	GZFNAME		= 1 << 3,		/* name of file included */
	GZFCOMMENT	= 1 << 4,		/* header comment included */
	GZFMASK		= (1 << 5) -1,		/* mask of specified bits */

	GZXFAST		= 2,			/* used fast algorithm, little compression */
	GZXBEST		= 4,			/* used maximum compression algorithm */

	GZOSFAT		= 0,			/* FAT file system */
	GZOSAMIGA	= 1,			/* Amiga */
	GZOSVMS		= 2,			/* VMS or OpenVMS */
	GZOSUNIX	= 3,			/* Unix */
	GZOSVMCMS	= 4,			/* VM/CMS */
	GZOSATARI	= 5,			/* Atari TOS */
	GZOSHPFS	= 6,			/* HPFS file system */
	GZOSMAC		= 7,			/* Macintosh */
	GZOSZSYS	= 8,			/* Z-System */
	GZOSCPM		= 9,			/* CP/M */
	GZOSTOPS20	= 10,			/* TOPS-20 */
	GZOSNTFS	= 11,			/* NTFS file system */
	GZOSQDOS	= 12,			/* QDOS */
	GZOSACORN	= 13,			/* Acorn RISCOS */
	GZOSUNK		= 255,

#define GZCRCPOLY 0xedb88320
/* 	GZCRCPOLY	= 0xedb88320UL, */

	GZOSINFERNO	= GZOSUNIX,
};