Lines Matching defs:in

3  * For conditions of distribution and use, see copyright notice in zlib.h
13 stream is provided on the command line. The compressed stream is decoded in
15 in the uncompressed output. The compressed file is left open, and can then
23 point in the uncompressed stream. build_index() works by decompressing the
26 a new access point. If so, that point is saved in a data structure that
29 To use the index, an offset in the uncompressed data is provided, for which
30 the latest accees point at or preceding that offset is located in the index.
31 The input file is positioned to the specified location in the index, and if
34 the decompression then proceeds until the desired offset in the file is
51 use of pointers in the state. The approach here allows for storage of the
52 index in a file.
68 off_t out; /* corresponding offset in uncompressed data */
69 off_t in; /* offset in input file of first full byte */
70 int bits; /* number of bits (1-7) from byte at in - 1, or 0 */
76 int have; /* number of list entries filled in */
93 off_t in, off_t out, unsigned left, unsigned char *window)
121 /* fill in entry and increment how many we have */
124 next->in = in;
140 of the first zlib or gzip stream in the file is ignored. build_index()
142 of memory, Z_DATA_ERROR for an error in the input file, or Z_ERRNO for a
144 local int build_index(FILE *in, off_t span, struct access **built)
172 strm.avail_in = fread(input, 1, CHUNK, in);
173 if (ferror(in)) {
227 /* clean up and return index (release unused entries in list) */
249 local int extract(FILE *in, struct access *index, off_t offset,
262 /* find where in stream to start */
277 ret = fseeko(in, here->in - (here->bits ? 1 : 0), SEEK_SET);
281 ret = getc(in);
283 ret = ferror(in) ? Z_ERRNO : Z_DATA_ERROR;
315 strm.avail_in = fread(input, 1, CHUNK, in);
316 if (ferror(in)) {
358 FILE *in;
367 in = fopen(argv[1], "rb");
368 if (in == NULL) {
374 len = build_index(in, SPAN, &index);
376 fclose(in);
382 fprintf(stderr, "zran: compressed data error in %s\n", argv[1]);
396 len = extract(in, index, offset, buf, CHUNK);
407 fclose(in);