rugged 0.26.3 → 0.26.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rugged/version.rb +1 -1
  3. data/vendor/libgit2/CMakeLists.txt +1 -1
  4. data/vendor/libgit2/deps/winhttp/winhttp.h +6 -4
  5. data/vendor/libgit2/deps/zlib/adler32.c +14 -7
  6. data/vendor/libgit2/deps/zlib/crc32.c +29 -12
  7. data/vendor/libgit2/deps/zlib/deflate.c +499 -303
  8. data/vendor/libgit2/deps/zlib/deflate.h +18 -15
  9. data/vendor/libgit2/deps/zlib/gzguts.h +218 -0
  10. data/vendor/libgit2/deps/zlib/infback.c +2 -2
  11. data/vendor/libgit2/deps/zlib/inffast.c +34 -51
  12. data/vendor/libgit2/deps/zlib/inflate.c +86 -37
  13. data/vendor/libgit2/deps/zlib/inflate.h +7 -4
  14. data/vendor/libgit2/deps/zlib/inftrees.c +12 -14
  15. data/vendor/libgit2/deps/zlib/trees.c +38 -61
  16. data/vendor/libgit2/deps/zlib/zconf.h +499 -23
  17. data/vendor/libgit2/deps/zlib/zlib.h +298 -154
  18. data/vendor/libgit2/deps/zlib/zutil.c +27 -23
  19. data/vendor/libgit2/deps/zlib/zutil.h +35 -17
  20. data/vendor/libgit2/include/git2.h +1 -0
  21. data/vendor/libgit2/include/git2/sys/mempack.h +5 -4
  22. data/vendor/libgit2/include/git2/version.h +2 -2
  23. data/vendor/libgit2/src/checkout.c +34 -11
  24. data/vendor/libgit2/src/curl_stream.c +21 -0
  25. data/vendor/libgit2/src/curl_stream.h +1 -0
  26. data/vendor/libgit2/src/delta.c +30 -28
  27. data/vendor/libgit2/src/diff.c +0 -7
  28. data/vendor/libgit2/src/diff_file.c +3 -1
  29. data/vendor/libgit2/src/diff_generate.c +1 -1
  30. data/vendor/libgit2/src/diff_tform.c +3 -1
  31. data/vendor/libgit2/src/global.c +4 -2
  32. data/vendor/libgit2/src/hash/hash_openssl.h +18 -3
  33. data/vendor/libgit2/src/ignore.c +60 -36
  34. data/vendor/libgit2/src/index.c +59 -26
  35. data/vendor/libgit2/src/indexer.c +15 -2
  36. data/vendor/libgit2/src/merge.c +18 -8
  37. data/vendor/libgit2/src/odb_mempack.c +1 -0
  38. data/vendor/libgit2/src/oidarray.c +12 -0
  39. data/vendor/libgit2/src/oidarray.h +1 -0
  40. data/vendor/libgit2/src/openssl_stream.c +17 -4
  41. data/vendor/libgit2/src/pack.c +10 -7
  42. data/vendor/libgit2/src/path.c +180 -22
  43. data/vendor/libgit2/src/path.h +73 -0
  44. data/vendor/libgit2/src/posix.c +1 -1
  45. data/vendor/libgit2/src/posix.h +3 -0
  46. data/vendor/libgit2/src/proxy.c +6 -0
  47. data/vendor/libgit2/src/proxy.h +1 -0
  48. data/vendor/libgit2/src/push.c +3 -0
  49. data/vendor/libgit2/src/refdb_fs.c +2 -2
  50. data/vendor/libgit2/src/refs.c +7 -1
  51. data/vendor/libgit2/src/repository.c +9 -3
  52. data/vendor/libgit2/src/sha1_lookup.c +2 -2
  53. data/vendor/libgit2/src/signature.c +1 -0
  54. data/vendor/libgit2/src/socket_stream.c +1 -1
  55. data/vendor/libgit2/src/stransport_stream.c +3 -1
  56. data/vendor/libgit2/src/submodule.c +54 -7
  57. data/vendor/libgit2/src/submodule.h +13 -0
  58. data/vendor/libgit2/src/transports/smart_pkt.c +8 -2
  59. data/vendor/libgit2/src/transports/smart_protocol.c +6 -6
  60. data/vendor/libgit2/src/transports/winhttp.c +22 -0
  61. data/vendor/libgit2/src/tree.c +1 -1
  62. metadata +3 -2
@@ -1,5 +1,5 @@
1
1
  /* deflate.h -- internal compression state
2
- * Copyright (C) 1995-2012 Jean-loup Gailly
2
+ * Copyright (C) 1995-2016 Jean-loup Gailly
3
3
  * For conditions of distribution and use, see copyright notice in zlib.h
4
4
  */
5
5
 
@@ -51,13 +51,16 @@
51
51
  #define Buf_size 16
52
52
  /* size of bit buffer in bi_buf */
53
53
 
54
- #define INIT_STATE 42
55
- #define EXTRA_STATE 69
56
- #define NAME_STATE 73
57
- #define COMMENT_STATE 91
58
- #define HCRC_STATE 103
59
- #define BUSY_STATE 113
60
- #define FINISH_STATE 666
54
+ #define INIT_STATE 42 /* zlib header -> BUSY_STATE */
55
+ #ifdef GZIP
56
+ # define GZIP_STATE 57 /* gzip header -> BUSY_STATE | EXTRA_STATE */
57
+ #endif
58
+ #define EXTRA_STATE 69 /* gzip extra block -> NAME_STATE */
59
+ #define NAME_STATE 73 /* gzip file name -> COMMENT_STATE */
60
+ #define COMMENT_STATE 91 /* gzip comment -> HCRC_STATE */
61
+ #define HCRC_STATE 103 /* gzip header CRC -> BUSY_STATE */
62
+ #define BUSY_STATE 113 /* deflate -> FINISH_STATE */
63
+ #define FINISH_STATE 666 /* stream complete */
61
64
  /* Stream status */
62
65
 
63
66
 
@@ -83,7 +86,7 @@ typedef struct static_tree_desc_s static_tree_desc;
83
86
  typedef struct tree_desc_s {
84
87
  ct_data *dyn_tree; /* the dynamic tree */
85
88
  int max_code; /* largest code with non zero frequency */
86
- static_tree_desc *stat_desc; /* the corresponding static tree */
89
+ const static_tree_desc *stat_desc; /* the corresponding static tree */
87
90
  } FAR tree_desc;
88
91
 
89
92
  typedef ush Pos;
@@ -100,10 +103,10 @@ typedef struct internal_state {
100
103
  Bytef *pending_buf; /* output still pending */
101
104
  ulg pending_buf_size; /* size of pending_buf */
102
105
  Bytef *pending_out; /* next pending byte to output to the stream */
103
- uInt pending; /* nb of bytes in the pending buffer */
106
+ ulg pending; /* nb of bytes in the pending buffer */
104
107
  int wrap; /* bit 0 true for zlib, bit 1 true for gzip */
105
108
  gz_headerp gzhead; /* gzip header information to write */
106
- uInt gzindex; /* where in extra, name, or comment */
109
+ ulg gzindex; /* where in extra, name, or comment */
107
110
  Byte method; /* can only be DEFLATED */
108
111
  int last_flush; /* value of flush param for previous deflate call */
109
112
 
@@ -249,7 +252,7 @@ typedef struct internal_state {
249
252
  uInt matches; /* number of string matches in current block */
250
253
  uInt insert; /* bytes at end of window left to insert */
251
254
 
252
- #ifdef DEBUG
255
+ #ifdef ZLIB_DEBUG
253
256
  ulg compressed_len; /* total bit length of compressed file mod 2^32 */
254
257
  ulg bits_sent; /* bit length of compressed data sent mod 2^32 */
255
258
  #endif
@@ -275,7 +278,7 @@ typedef struct internal_state {
275
278
  /* Output a byte on the stream.
276
279
  * IN assertion: there is enough room in pending_buf.
277
280
  */
278
- #define put_byte(s, c) {s->pending_buf[s->pending++] = (c);}
281
+ #define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
279
282
 
280
283
 
281
284
  #define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
@@ -309,7 +312,7 @@ void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf,
309
312
  * used.
310
313
  */
311
314
 
312
- #ifndef DEBUG
315
+ #ifndef ZLIB_DEBUG
313
316
  /* Inline versions of _tr_tally for speed: */
314
317
 
315
318
  #if defined(GEN_TREES_H) || !defined(STDC)
@@ -321,7 +324,7 @@ void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf,
321
324
  #endif
322
325
 
323
326
  # define _tr_tally_lit(s, c, flush) \
324
- { uch cc = (uch)(c); \
327
+ { uch cc = (c); \
325
328
  s->d_buf[s->last_lit] = 0; \
326
329
  s->l_buf[s->last_lit++] = cc; \
327
330
  s->dyn_ltree[cc].Freq++; \
@@ -0,0 +1,218 @@
1
+ /* gzguts.h -- zlib internal header definitions for gz* operations
2
+ * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013, 2016 Mark Adler
3
+ * For conditions of distribution and use, see copyright notice in zlib.h
4
+ */
5
+
6
+ #ifdef _LARGEFILE64_SOURCE
7
+ # ifndef _LARGEFILE_SOURCE
8
+ # define _LARGEFILE_SOURCE 1
9
+ # endif
10
+ # ifdef _FILE_OFFSET_BITS
11
+ # undef _FILE_OFFSET_BITS
12
+ # endif
13
+ #endif
14
+
15
+ #ifdef HAVE_HIDDEN
16
+ # define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
17
+ #else
18
+ # define ZLIB_INTERNAL
19
+ #endif
20
+
21
+ #include <stdio.h>
22
+ #include "zlib.h"
23
+ #ifdef STDC
24
+ # include <string.h>
25
+ # include <stdlib.h>
26
+ # include <limits.h>
27
+ #endif
28
+
29
+ #ifndef _POSIX_SOURCE
30
+ # define _POSIX_SOURCE
31
+ #endif
32
+ #include <fcntl.h>
33
+
34
+ #ifdef _WIN32
35
+ # include <stddef.h>
36
+ #endif
37
+
38
+ #if defined(__TURBOC__) || defined(_MSC_VER) || defined(_WIN32)
39
+ # include <io.h>
40
+ #endif
41
+
42
+ #if defined(_WIN32) || defined(__CYGWIN__)
43
+ # define WIDECHAR
44
+ #endif
45
+
46
+ #ifdef WINAPI_FAMILY
47
+ # define open _open
48
+ # define read _read
49
+ # define write _write
50
+ # define close _close
51
+ #endif
52
+
53
+ #ifdef NO_DEFLATE /* for compatibility with old definition */
54
+ # define NO_GZCOMPRESS
55
+ #endif
56
+
57
+ #if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550)
58
+ # ifndef HAVE_VSNPRINTF
59
+ # define HAVE_VSNPRINTF
60
+ # endif
61
+ #endif
62
+
63
+ #if defined(__CYGWIN__)
64
+ # ifndef HAVE_VSNPRINTF
65
+ # define HAVE_VSNPRINTF
66
+ # endif
67
+ #endif
68
+
69
+ #if defined(MSDOS) && defined(__BORLANDC__) && (BORLANDC > 0x410)
70
+ # ifndef HAVE_VSNPRINTF
71
+ # define HAVE_VSNPRINTF
72
+ # endif
73
+ #endif
74
+
75
+ #ifndef HAVE_VSNPRINTF
76
+ # ifdef MSDOS
77
+ /* vsnprintf may exist on some MS-DOS compilers (DJGPP?),
78
+ but for now we just assume it doesn't. */
79
+ # define NO_vsnprintf
80
+ # endif
81
+ # ifdef __TURBOC__
82
+ # define NO_vsnprintf
83
+ # endif
84
+ # ifdef WIN32
85
+ /* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */
86
+ # if !defined(vsnprintf) && !defined(NO_vsnprintf)
87
+ # if !defined(_MSC_VER) || ( defined(_MSC_VER) && _MSC_VER < 1500 )
88
+ # define vsnprintf _vsnprintf
89
+ # endif
90
+ # endif
91
+ # endif
92
+ # ifdef __SASC
93
+ # define NO_vsnprintf
94
+ # endif
95
+ # ifdef VMS
96
+ # define NO_vsnprintf
97
+ # endif
98
+ # ifdef __OS400__
99
+ # define NO_vsnprintf
100
+ # endif
101
+ # ifdef __MVS__
102
+ # define NO_vsnprintf
103
+ # endif
104
+ #endif
105
+
106
+ /* unlike snprintf (which is required in C99), _snprintf does not guarantee
107
+ null termination of the result -- however this is only used in gzlib.c where
108
+ the result is assured to fit in the space provided */
109
+ #if defined(_MSC_VER) && _MSC_VER < 1900
110
+ # define snprintf _snprintf
111
+ #endif
112
+
113
+ #ifndef local
114
+ # define local static
115
+ #endif
116
+ /* since "static" is used to mean two completely different things in C, we
117
+ define "local" for the non-static meaning of "static", for readability
118
+ (compile with -Dlocal if your debugger can't find static symbols) */
119
+
120
+ /* gz* functions always use library allocation functions */
121
+ #ifndef STDC
122
+ extern voidp malloc OF((uInt size));
123
+ extern void free OF((voidpf ptr));
124
+ #endif
125
+
126
+ /* get errno and strerror definition */
127
+ #if defined UNDER_CE
128
+ # include <windows.h>
129
+ # define zstrerror() gz_strwinerror((DWORD)GetLastError())
130
+ #else
131
+ # ifndef NO_STRERROR
132
+ # include <errno.h>
133
+ # define zstrerror() strerror(errno)
134
+ # else
135
+ # define zstrerror() "stdio error (consult errno)"
136
+ # endif
137
+ #endif
138
+
139
+ /* provide prototypes for these when building zlib without LFS */
140
+ #if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0
141
+ ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
142
+ ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
143
+ ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
144
+ ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
145
+ #endif
146
+
147
+ /* default memLevel */
148
+ #if MAX_MEM_LEVEL >= 8
149
+ # define DEF_MEM_LEVEL 8
150
+ #else
151
+ # define DEF_MEM_LEVEL MAX_MEM_LEVEL
152
+ #endif
153
+
154
+ /* default i/o buffer size -- double this for output when reading (this and
155
+ twice this must be able to fit in an unsigned type) */
156
+ #define GZBUFSIZE 8192
157
+
158
+ /* gzip modes, also provide a little integrity check on the passed structure */
159
+ #define GZ_NONE 0
160
+ #define GZ_READ 7247
161
+ #define GZ_WRITE 31153
162
+ #define GZ_APPEND 1 /* mode set to GZ_WRITE after the file is opened */
163
+
164
+ /* values for gz_state how */
165
+ #define LOOK 0 /* look for a gzip header */
166
+ #define COPY 1 /* copy input directly */
167
+ #define GZIP 2 /* decompress a gzip stream */
168
+
169
+ /* internal gzip file state data structure */
170
+ typedef struct {
171
+ /* exposed contents for gzgetc() macro */
172
+ struct gzFile_s x; /* "x" for exposed */
173
+ /* x.have: number of bytes available at x.next */
174
+ /* x.next: next output data to deliver or write */
175
+ /* x.pos: current position in uncompressed data */
176
+ /* used for both reading and writing */
177
+ int mode; /* see gzip modes above */
178
+ int fd; /* file descriptor */
179
+ char *path; /* path or fd for error messages */
180
+ unsigned size; /* buffer size, zero if not allocated yet */
181
+ unsigned want; /* requested buffer size, default is GZBUFSIZE */
182
+ unsigned char *in; /* input buffer (double-sized when writing) */
183
+ unsigned char *out; /* output buffer (double-sized when reading) */
184
+ int direct; /* 0 if processing gzip, 1 if transparent */
185
+ /* just for reading */
186
+ int how; /* 0: get header, 1: copy, 2: decompress */
187
+ z_off64_t start; /* where the gzip data started, for rewinding */
188
+ int eof; /* true if end of input file reached */
189
+ int past; /* true if read requested past end */
190
+ /* just for writing */
191
+ int level; /* compression level */
192
+ int strategy; /* compression strategy */
193
+ /* seek request */
194
+ z_off64_t skip; /* amount to skip (already rewound if backwards) */
195
+ int seek; /* true if seek request pending */
196
+ /* error information */
197
+ int err; /* error code */
198
+ char *msg; /* error message */
199
+ /* zlib inflate or deflate stream */
200
+ z_stream strm; /* stream structure in-place (not a pointer) */
201
+ } gz_state;
202
+ typedef gz_state FAR *gz_statep;
203
+
204
+ /* shared functions */
205
+ void ZLIB_INTERNAL gz_error OF((gz_statep, int, const char *));
206
+ #if defined UNDER_CE
207
+ char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error));
208
+ #endif
209
+
210
+ /* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t
211
+ value -- needed when comparing unsigned to z_off64_t, which is signed
212
+ (possible z_off64_t types off_t, off64_t, and long are all signed) */
213
+ #ifdef INT_MAX
214
+ # define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX)
215
+ #else
216
+ unsigned ZLIB_INTERNAL gz_intmax OF((void));
217
+ # define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax())
218
+ #endif
@@ -1,5 +1,5 @@
1
1
  /* infback.c -- inflate using a call-back interface
2
- * Copyright (C) 1995-2011 Mark Adler
2
+ * Copyright (C) 1995-2016 Mark Adler
3
3
  * For conditions of distribution and use, see copyright notice in zlib.h
4
4
  */
5
5
 
@@ -61,7 +61,7 @@ int stream_size;
61
61
  Tracev((stderr, "inflate: allocated\n"));
62
62
  strm->state = (struct internal_state FAR *)state;
63
63
  state->dmax = 32768U;
64
- state->wbits = windowBits;
64
+ state->wbits = (uInt)windowBits;
65
65
  state->wsize = 1U << windowBits;
66
66
  state->window = window;
67
67
  state->wnext = 0;
@@ -1,5 +1,5 @@
1
1
  /* inffast.c -- fast decoding
2
- * Copyright (C) 1995-2008, 2010, 2013 Mark Adler
2
+ * Copyright (C) 1995-2017 Mark Adler
3
3
  * For conditions of distribution and use, see copyright notice in zlib.h
4
4
  */
5
5
 
@@ -8,26 +8,9 @@
8
8
  #include "inflate.h"
9
9
  #include "inffast.h"
10
10
 
11
- #ifndef ASMINF
12
-
13
- /* Allow machine dependent optimization for post-increment or pre-increment.
14
- Based on testing to date,
15
- Pre-increment preferred for:
16
- - PowerPC G3 (Adler)
17
- - MIPS R5000 (Randers-Pehrson)
18
- Post-increment preferred for:
19
- - none
20
- No measurable difference:
21
- - Pentium III (Anderson)
22
- - M68060 (Nikl)
23
- */
24
- #ifdef POSTINC
25
- # define OFF 0
26
- # define PUP(a) *(a)++
11
+ #ifdef ASMINF
12
+ # pragma message("Assembler code may have bugs -- use at your own risk")
27
13
  #else
28
- # define OFF 1
29
- # define PUP(a) *++(a)
30
- #endif
31
14
 
32
15
  /*
33
16
  Decode literal, length, and distance codes and write out the resulting
@@ -96,9 +79,9 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
96
79
 
97
80
  /* copy state to local variables */
98
81
  state = (struct inflate_state FAR *)strm->state;
99
- in = strm->next_in - OFF;
82
+ in = strm->next_in;
100
83
  last = in + (strm->avail_in - 5);
101
- out = strm->next_out - OFF;
84
+ out = strm->next_out;
102
85
  beg = out - (start - strm->avail_out);
103
86
  end = out + (strm->avail_out - 257);
104
87
  #ifdef INFLATE_STRICT
@@ -119,9 +102,9 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
119
102
  input data or output space */
120
103
  do {
121
104
  if (bits < 15) {
122
- hold += (unsigned long)(PUP(in)) << bits;
105
+ hold += (unsigned long)(*in++) << bits;
123
106
  bits += 8;
124
- hold += (unsigned long)(PUP(in)) << bits;
107
+ hold += (unsigned long)(*in++) << bits;
125
108
  bits += 8;
126
109
  }
127
110
  here = lcode[hold & lmask];
@@ -134,14 +117,14 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
134
117
  Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
135
118
  "inflate: literal '%c'\n" :
136
119
  "inflate: literal 0x%02x\n", here.val));
137
- PUP(out) = (unsigned char)(here.val);
120
+ *out++ = (unsigned char)(here.val);
138
121
  }
139
122
  else if (op & 16) { /* length base */
140
123
  len = (unsigned)(here.val);
141
124
  op &= 15; /* number of extra bits */
142
125
  if (op) {
143
126
  if (bits < op) {
144
- hold += (unsigned long)(PUP(in)) << bits;
127
+ hold += (unsigned long)(*in++) << bits;
145
128
  bits += 8;
146
129
  }
147
130
  len += (unsigned)hold & ((1U << op) - 1);
@@ -150,9 +133,9 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
150
133
  }
151
134
  Tracevv((stderr, "inflate: length %u\n", len));
152
135
  if (bits < 15) {
153
- hold += (unsigned long)(PUP(in)) << bits;
136
+ hold += (unsigned long)(*in++) << bits;
154
137
  bits += 8;
155
- hold += (unsigned long)(PUP(in)) << bits;
138
+ hold += (unsigned long)(*in++) << bits;
156
139
  bits += 8;
157
140
  }
158
141
  here = dcode[hold & dmask];
@@ -165,10 +148,10 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
165
148
  dist = (unsigned)(here.val);
166
149
  op &= 15; /* number of extra bits */
167
150
  if (bits < op) {
168
- hold += (unsigned long)(PUP(in)) << bits;
151
+ hold += (unsigned long)(*in++) << bits;
169
152
  bits += 8;
170
153
  if (bits < op) {
171
- hold += (unsigned long)(PUP(in)) << bits;
154
+ hold += (unsigned long)(*in++) << bits;
172
155
  bits += 8;
173
156
  }
174
157
  }
@@ -196,30 +179,30 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
196
179
  #ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
197
180
  if (len <= op - whave) {
198
181
  do {
199
- PUP(out) = 0;
182
+ *out++ = 0;
200
183
  } while (--len);
201
184
  continue;
202
185
  }
203
186
  len -= op - whave;
204
187
  do {
205
- PUP(out) = 0;
188
+ *out++ = 0;
206
189
  } while (--op > whave);
207
190
  if (op == 0) {
208
191
  from = out - dist;
209
192
  do {
210
- PUP(out) = PUP(from);
193
+ *out++ = *from++;
211
194
  } while (--len);
212
195
  continue;
213
196
  }
214
197
  #endif
215
198
  }
216
- from = window - OFF;
199
+ from = window;
217
200
  if (wnext == 0) { /* very common case */
218
201
  from += wsize - op;
219
202
  if (op < len) { /* some from window */
220
203
  len -= op;
221
204
  do {
222
- PUP(out) = PUP(from);
205
+ *out++ = *from++;
223
206
  } while (--op);
224
207
  from = out - dist; /* rest from output */
225
208
  }
@@ -230,14 +213,14 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
230
213
  if (op < len) { /* some from end of window */
231
214
  len -= op;
232
215
  do {
233
- PUP(out) = PUP(from);
216
+ *out++ = *from++;
234
217
  } while (--op);
235
- from = window - OFF;
218
+ from = window;
236
219
  if (wnext < len) { /* some from start of window */
237
220
  op = wnext;
238
221
  len -= op;
239
222
  do {
240
- PUP(out) = PUP(from);
223
+ *out++ = *from++;
241
224
  } while (--op);
242
225
  from = out - dist; /* rest from output */
243
226
  }
@@ -248,35 +231,35 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
248
231
  if (op < len) { /* some from window */
249
232
  len -= op;
250
233
  do {
251
- PUP(out) = PUP(from);
234
+ *out++ = *from++;
252
235
  } while (--op);
253
236
  from = out - dist; /* rest from output */
254
237
  }
255
238
  }
256
239
  while (len > 2) {
257
- PUP(out) = PUP(from);
258
- PUP(out) = PUP(from);
259
- PUP(out) = PUP(from);
240
+ *out++ = *from++;
241
+ *out++ = *from++;
242
+ *out++ = *from++;
260
243
  len -= 3;
261
244
  }
262
245
  if (len) {
263
- PUP(out) = PUP(from);
246
+ *out++ = *from++;
264
247
  if (len > 1)
265
- PUP(out) = PUP(from);
248
+ *out++ = *from++;
266
249
  }
267
250
  }
268
251
  else {
269
252
  from = out - dist; /* copy direct from output */
270
253
  do { /* minimum length is three */
271
- PUP(out) = PUP(from);
272
- PUP(out) = PUP(from);
273
- PUP(out) = PUP(from);
254
+ *out++ = *from++;
255
+ *out++ = *from++;
256
+ *out++ = *from++;
274
257
  len -= 3;
275
258
  } while (len > 2);
276
259
  if (len) {
277
- PUP(out) = PUP(from);
260
+ *out++ = *from++;
278
261
  if (len > 1)
279
- PUP(out) = PUP(from);
262
+ *out++ = *from++;
280
263
  }
281
264
  }
282
265
  }
@@ -313,8 +296,8 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
313
296
  hold &= (1U << bits) - 1;
314
297
 
315
298
  /* update state and return */
316
- strm->next_in = in + OFF;
317
- strm->next_out = out + OFF;
299
+ strm->next_in = in;
300
+ strm->next_out = out;
318
301
  strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last));
319
302
  strm->avail_out = (unsigned)(out < end ?
320
303
  257 + (end - out) : 257 - (out - end));