Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Side by Side Diff: third_party/zlib/infback.c

Issue 2690623003: Update zlib to 1.2.11 (Closed)
Patch Set: Drop the inflater change, improve the deflater comment Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/zlib/gzwrite.c ('k') | third_party/zlib/inffast.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* infback.c -- inflate using a call-back interface 1 /* infback.c -- inflate using a call-back interface
2 * Copyright (C) 1995-2011 Mark Adler 2 * Copyright (C) 1995-2016 Mark Adler
3 * For conditions of distribution and use, see copyright notice in zlib.h 3 * For conditions of distribution and use, see copyright notice in zlib.h
4 */ 4 */
5 5
6 /* 6 /*
7 This code is largely copied from inflate.c. Normally either infback.o or 7 This code is largely copied from inflate.c. Normally either infback.o or
8 inflate.o would be linked into an application--not both. The interface 8 inflate.o would be linked into an application--not both. The interface
9 with inffast.c is retained so that optimized assembler-coded versions of 9 with inffast.c is retained so that optimized assembler-coded versions of
10 inflate_fast() can be used with either inflate.c or infback.c. 10 inflate_fast() can be used with either inflate.c or infback.c.
11 */ 11 */
12 12
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 return Z_STREAM_ERROR; 54 return Z_STREAM_ERROR;
55 #else 55 #else
56 strm->zfree = zcfree; 56 strm->zfree = zcfree;
57 #endif 57 #endif
58 state = (struct inflate_state FAR *)ZALLOC(strm, 1, 58 state = (struct inflate_state FAR *)ZALLOC(strm, 1,
59 sizeof(struct inflate_state)); 59 sizeof(struct inflate_state));
60 if (state == Z_NULL) return Z_MEM_ERROR; 60 if (state == Z_NULL) return Z_MEM_ERROR;
61 Tracev((stderr, "inflate: allocated\n")); 61 Tracev((stderr, "inflate: allocated\n"));
62 strm->state = (struct internal_state FAR *)state; 62 strm->state = (struct internal_state FAR *)state;
63 state->dmax = 32768U; 63 state->dmax = 32768U;
64 state->wbits = windowBits; 64 state->wbits = (uInt)windowBits;
65 state->wsize = 1U << windowBits; 65 state->wsize = 1U << windowBits;
66 state->window = window; 66 state->window = window;
67 state->wnext = 0; 67 state->wnext = 0;
68 state->whave = 0; 68 state->whave = 0;
69 return Z_OK; 69 return Z_OK;
70 } 70 }
71 71
72 /* 72 /*
73 Return state with length and distance decoding tables and index sizes set to 73 Return state with length and distance decoding tables and index sizes set to
74 fixed code decoding. Normally this returns fixed tables from inffixed.h. 74 fixed code decoding. Normally this returns fixed tables from inffixed.h.
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 int ZEXPORT inflateBackEnd(strm) 631 int ZEXPORT inflateBackEnd(strm)
632 z_streamp strm; 632 z_streamp strm;
633 { 633 {
634 if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0) 634 if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
635 return Z_STREAM_ERROR; 635 return Z_STREAM_ERROR;
636 ZFREE(strm, strm->state); 636 ZFREE(strm, strm->state);
637 strm->state = Z_NULL; 637 strm->state = Z_NULL;
638 Tracev((stderr, "inflate: end\n")); 638 Tracev((stderr, "inflate: end\n"));
639 return Z_OK; 639 return Z_OK;
640 } 640 }
OLDNEW
« no previous file with comments | « third_party/zlib/gzwrite.c ('k') | third_party/zlib/inffast.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698