• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/zlib-53/zlib/contrib/puff/

Lines Matching refs:len

158     unsigned len;       /* length of stored block */
166 len = s->in[s->incnt++];
167 len |= s->in[s->incnt++] << 8;
168 if (s->in[s->incnt++] != (~len & 0xff) ||
169 s->in[s->incnt++] != ((~len >> 8) & 0xff))
172 /* copy len bytes from in to out */
173 if (s->incnt + len > s->inlen) return 2; /* not enough input */
175 if (s->outcnt + len > s->outlen)
177 while (len--)
181 s->outcnt += len;
182 s->incnt += len;
227 int len; /* current number of bits in code */
228 int code; /* len bits being decoded */
229 int first; /* first code of length len */
230 int count; /* number of codes of length len */
231 int index; /* index of first code of length len in symbol table */
234 for (len = 1; len <= MAXBITS; len++) {
236 count = h->count[len];
237 if (code - count < first) /* if length len, return symbol */
255 int len; /* current number of bits in code */
256 int code; /* len bits being decoded */
257 int first; /* first code of length len */
258 int count; /* number of codes of length len */
259 int index; /* index of first code of length len in symbol table */
267 len = 1;
274 if (code - count < first) { /* if length len, return symbol */
276 s->bitcnt = (s->bitcnt - len) & 7;
283 len++;
285 left = (MAXBITS+1) - len;
330 int len; /* current length when stepping through h->count[] */
335 for (len = 0; len <= MAXBITS; len++)
336 h->count[len] = 0;
344 for (len = 1; len <= MAXBITS; len++) {
346 left -= h->count[len]; /* deduct count from possible codes */
352 for (len = 1; len < MAXBITS; len++)
353 offs[len + 1] = offs[len] + h->count[len];
427 int len; /* length for copy */
460 len = lens[symbol] + bits(s, lext[symbol]);
473 if (s->outcnt + len > s->outlen) return 1;
474 while (len--) {
484 s->outcnt += len;
684 int len; /* last length to repeat */
690 len = 0; /* assume repeating zeros */
693 len = lengths[index - 1]; /* last length */
703 lengths[index++] = len;
851 failure. *len is the number of bytes of data read from the input file (even
853 or read, *len is zero. */
854 local void *load(char *name, size_t *len)
860 *len = 0;
867 *len += fread((char *)buf + *len, 1, size - *len, in);
868 if (*len < size) break;
870 if (size == *len || (swap = realloc(buf, size)) == NULL) {
888 size_t len = 0;
909 source = load(name, &len);
914 if (len == 0) {
920 if (skip >= len) {
927 len -= skip;
928 sourcelen = (unsigned long)len;
934 if (sourcelen < len) fprintf(stderr, "%lu compressed bytes unused\n",
935 len - sourcelen);