Home | History | Annotate | Download | only in zlib

Lines Matching defs:inflate

1 /*	$NetBSD: inflate.c,v 1.8 2024/09/22 19:12:27 christos Exp $	*/
3 /* inflate.c -- zlib decompression
12 * - First version -- complete rewrite of inflate to simplify code, avoid
15 * improve code readability and style over the previous zlib inflate code
26 * - Correct filename to inffixed.h for fixed tables in inflate.c
27 * - Make hbuf[] unsigned char to match parameter type in inflate.c
29 * to avoid negation problem on Alphas (64 bit) in inflate.c
39 * - Make MATCH copy in inflate() much faster for when inflate_fast() not used
41 * buffer and bit count in inflate()--for speed when inflate_fast() not used
45 * - Move a comment on output buffer sizes from inffast.c to inflate.c
55 * source file infback.c to provide a call-back interface to inflate for
80 * - Check next_in and next_out for Z_NULL on entry to inflate()
87 #include "inflate.h"
128 Tracev((stderr, "inflate: reset\n"));
207 Tracev((stderr, "inflate: allocated\n"));
360 inflate call, but the end of the deflate stream has not been reached yet.
364 Providing output buffers larger than 32K to inflate() should provide a speed
366 upon return from inflate(), and since all distances after the first 32K of
416 /* Macros for inflate(): */
445 /* Load registers with state in inflate() for speed */
456 /* Restore state from registers in inflate() */
474 /* Get a byte of input into the bit accumulator, or return from inflate()
485 inflate(). */
511 inflate() uses a state machine to process as much input data and generate as
526 so when inflate() is called again, the same case is attempted again, and
537 where NEEDBITS(n) either returns from inflate() if there isn't enough
574 during that inflate() call in order to return the proper return code.
579 output to the window for the next call of inflate().
581 In this implementation, the flush parameter of inflate() only affects the
582 return code (per zlib.h). inflate() always writes as much as possible to
584 documented in zlib.h of Z_SYNC_FLUSH. Furthermore, inflate() always defers
588 when flush is set to Z_FINISH, inflate() cannot return Z_OK. Instead it
592 int ZEXPORT inflate(z_streamp strm, int flush) {
674 Tracev((stderr, "inflate: zlib header ok\n"));
847 Tracev((stderr, "inflate: stored block%s\n",
853 Tracev((stderr, "inflate: fixed codes block%s\n",
862 Tracev((stderr, "inflate: dynamic codes block%s\n",
881 Tracev((stderr, "inflate: stored length %u\n",
904 Tracev((stderr, "inflate: stored end\n"));
922 Tracev((stderr, "inflate: table sizes ok\n"));
944 Tracev((stderr, "inflate: code lengths ok\n"));
1028 Tracev((stderr, "inflate: codes ok\n"));
1066 "inflate: literal '%c'\n" :
1067 "inflate: literal 0x%02x\n", here.val));
1072 Tracevv((stderr, "inflate: end of block\n"));
1092 Tracevv((stderr, "inflate: length %u\n", state->length));
1138 Tracevv((stderr, "inflate: distance %u\n", state->offset));
1153 Trace((stderr, "inflate.c too far\n"));
1212 Tracev((stderr, "inflate: check matches trailer\n"));
1226 Tracev((stderr, "inflate: length matches trailer\n"));
1246 Return from inflate(), updating the total counts and the check value.
1247 If there was no progress during the inflate() call, return a buffer
1249 Note: a memory error from inflate() is non-recoverable.
1283 Tracev((stderr, "inflate: end\n"));
1335 inflate: dictionary set\n"));
1417 /* return no joy or set up to restart inflate() on a new block */
1433 Returns true if inflate is currently at the end of a block generated by
1438 inflate is waiting for these length bytes.