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

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

Issue 2084863002: Update Zlib to version 1.2.8 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/infback.c ('k') | third_party/zlib/inffixed.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* inffast.c -- fast decoding 1 /* inffast.c -- fast decoding
2 * Copyright (C) 1995-2008, 2010 Mark Adler 2 * Copyright (C) 1995-2008, 2010, 2013 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 #include "zutil.h" 6 #include "zutil.h"
7 #include "inftrees.h" 7 #include "inftrees.h"
8 #include "inflate.h" 8 #include "inflate.h"
9 #include "inffast.h" 9 #include "inffast.h"
10 10
11 #ifndef ASMINF 11 #ifndef ASMINF
12 12
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 - The maximum bytes that a single length/distance pair can output is 258 62 - The maximum bytes that a single length/distance pair can output is 258
63 bytes, which is the maximum length that can be coded. inflate_fast() 63 bytes, which is the maximum length that can be coded. inflate_fast()
64 requires strm->avail_out >= 258 for each loop to avoid checking for 64 requires strm->avail_out >= 258 for each loop to avoid checking for
65 output space. 65 output space.
66 */ 66 */
67 void ZLIB_INTERNAL inflate_fast(strm, start) 67 void ZLIB_INTERNAL inflate_fast(strm, start)
68 z_streamp strm; 68 z_streamp strm;
69 unsigned start; /* inflate()'s starting value for strm->avail_out */ 69 unsigned start; /* inflate()'s starting value for strm->avail_out */
70 { 70 {
71 struct inflate_state FAR *state; 71 struct inflate_state FAR *state;
72 unsigned char FAR *in; /* local strm->next_in */ 72 z_const unsigned char FAR *in; /* local strm->next_in */
73 unsigned char FAR *last; /* while in < last, enough input available */ 73 z_const unsigned char FAR *last; /* have enough input while in < last */
74 unsigned char FAR *out; /* local strm->next_out */ 74 unsigned char FAR *out; /* local strm->next_out */
75 unsigned char FAR *beg; /* inflate()'s initial strm->next_out */ 75 unsigned char FAR *beg; /* inflate()'s initial strm->next_out */
76 unsigned char FAR *end; /* while out < end, enough space available */ 76 unsigned char FAR *end; /* while out < end, enough space available */
77 #ifdef INFLATE_STRICT 77 #ifdef INFLATE_STRICT
78 unsigned dmax; /* maximum distance from zlib header */ 78 unsigned dmax; /* maximum distance from zlib header */
79 #endif 79 #endif
80 unsigned wsize; /* window size or zero if not using window */ 80 unsigned wsize; /* window size or zero if not using window */
81 unsigned whave; /* valid bytes in the window */ 81 unsigned whave; /* valid bytes in the window */
82 unsigned wnext; /* window write index */ 82 unsigned wnext; /* window write index */
83 unsigned char FAR *window; /* allocated sliding window, if wsize != 0 */ 83 unsigned char FAR *window; /* allocated sliding window, if wsize != 0 */
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 - Special case for distance > 1 copies to do overlapped load and store copy 331 - Special case for distance > 1 copies to do overlapped load and store copy
332 - Explicit branch predictions (based on measured branch probabilities) 332 - Explicit branch predictions (based on measured branch probabilities)
333 - Deferring match copy and interspersed it with decoding subsequent codes 333 - Deferring match copy and interspersed it with decoding subsequent codes
334 - Swapping literal/length else 334 - Swapping literal/length else
335 - Swapping window/direct else 335 - Swapping window/direct else
336 - Larger unrolled copy loops (three is about right) 336 - Larger unrolled copy loops (three is about right)
337 - Moving len -= 3 statement into middle of loop 337 - Moving len -= 3 statement into middle of loop
338 */ 338 */
339 339
340 #endif /* !ASMINF */ 340 #endif /* !ASMINF */
OLDNEW
« no previous file with comments | « third_party/zlib/infback.c ('k') | third_party/zlib/inffixed.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698