Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
ZIP.h
Go to the documentation of this file.
1/* @(#)root/zip:$Id$ */
2/* Author: */
3/*
4
5 Copyright (C) 1990-1993 Mark Adler, Richard B. Wales, Jean-loup Gailly,
6 Kai Uwe Rommel and Igor Mandrichenko.
7 For conditions of distribution and use, see copyright notice in zlib.h
8
9*/
10
11/*
12 * zip.h by Mark Adler.
13 */
14
15#ifndef ZIP
16#define ZIP /* for crypt.c: include zip password functions, not unzip */
17
18/* Set up portability */
19/* #include "tailor.h" */
20#include "Tailor.h"
21
22#define MIN_MATCH 3
23#define MAX_MATCH 258
24/* The minimum and maximum match lengths */
25
26#ifndef WSIZE
27# define WSIZE ((unsigned)32768)
28#endif
29/* Maximum window size = 32K. If you are really short of memory, compile
30 * with a smaller WSIZE but this reduces the compression ratio for files
31 * of size > WSIZE. WSIZE must be a power of two in the current implementation.
32 */
33
34#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
35/* Minimum amount of lookahead, except at the end of the input file.
36 * See deflate.c for comments about the MIN_MATCH+1.
37 */
38
39#define MAX_DIST (WSIZE-MIN_LOOKAHEAD)
40/* In order to simplify the code, particularly on 16 bit machines, match
41 * distances are limited to MAX_DIST instead of WSIZE.
42 */
43
44
45/* Define fseek() commands */
46#ifndef SEEK_SET
47# define SEEK_SET 0
48#endif /* !SEEK_SET */
49
50#ifndef SEEK_CUR
51# define SEEK_CUR 1
52#endif /* !SEEK_CUR */
53
54/* Types centralized here for easy modification */
55#define local static /* More meaningful outside functions */
56typedef unsigned char uch; /* unsigned 8-bit value */
57typedef unsigned short ush; /* unsigned 16-bit value */
58typedef unsigned long ulg; /* unsigned 32-bit value */
59
60/* internal file attribute */
61#define UNKNOWN (-1)
62#define BINARY 0
63#define ASCII 1
64
65#define BEST -1 /* Use best method (deflation or store) */
66#define STORE 0 /* Store method */
67#define DEFLATE 8 /* Deflation method*/
68
69/* Diagnostic functions */
70#ifdef DEBUG
71# ifdef MSDOS
72# undef stderr
73# define stderr stdout
74# endif
75# define diag(where) fprintf(stderr, "zip diagnostic: %s\n", where)
76# define Assert(cond,msg) {if(!(cond)) error(msg);}
77# define Trace(x) fprintf x
78# define Tracev(x) {if (verbose) fprintf x ;}
79# define Tracevv(x) {if (verbose>1) fprintf x ;}
80# define Tracec(c,x) {if (verbose && (c)) fprintf x ;}
81# define Tracecv(c,x) {if (verbose>1 && (c)) fprintf x ;}
82#else
83# define diag(where)
84# define Assert(cond,msg)
85# define Trace(x)
86# define Tracev(x)
87# define Tracevv(x)
88# define Tracec(c,x)
89# define Tracecv(c,x)
90#endif
91
92#ifdef __cplusplus
93extern "C" {
94#endif
95
96extern int gCompressionLevel; /* Compression level */
97
100
101 /* in deflate.c */
102int R__lm_init OF((bits_internal_state *state,int pack_level, ush *flags));
103void R__lm_free OF((void));
104ulg R__Deflate OF((bits_internal_state *state,int *errorflag));
105
106 /* in trees.c */
107int R__ct_init OF((tree_internal_state *t_state, ush *attr, int *method));
108int R__ct_tally OF((bits_internal_state *state, int dist, int lc));
109ulg R__flush_block OF((bits_internal_state *state, char far *buf, ulg stored_len, int eof,int *errorflag));
111
112void R__error(const char *);
113
114#ifdef __cplusplus
115} // extern "C"
116#endif
117
118#endif /* !ZIP */
119/* end of zip.h */
120
int gCompressionLevel
Copyright (C) 1990-1993 Mark Adler, Richard B.
Definition Bits.c:77
#define far
Definition Tailor.h:122
#define OF(a)
Definition Tailor.h:87
int R__lm_free()
Definition ZDeflate.c:304
int R__lm_init(bits_internal_state *state, int pack_level, ush *flags)
Definition ZDeflate.c:214
ulg R__Deflate(bits_internal_state *state, int *errorflag)
Definition ZDeflate.c:645
int R__error(char *)
Definition Bits.c:125
int R__ct_init()
tree_internal_state * R__get_thread_tree_state()
Definition ZTrees.c:293
ulg R__flush_block()
int R__ct_tally()
unsigned short ush
Definition ZInflate.c:225
unsigned long ulg
Definition ZInflate.c:226
unsigned char uch
Definition ZInflate.c:224