Lines Matching defs:len
21 local int gz_load(state, buf, len, have)
24 unsigned len;
31 ret = read(state->fd, buf + *have, len - *have);
35 } while (*have < len);
109 unsigned len;
177 len = (unsigned)NEXT();
178 len += (unsigned)NEXT() << 8;
179 while (len--)
238 unsigned long crc, len;
277 if (gz_next4(state, &crc) == -1 || gz_next4(state, &len) == -1) {
285 if (len != (strm->total_out & 0xffffffffL)) {
329 /* Skip len uncompressed bytes of output. Return -1 on error, 0 on success. */
330 local int gz_skip(state, len)
332 z_off64_t len;
336 /* skip over len bytes or reach end-of-file, whichever comes first */
337 while (len)
340 n = GT_OFF(state->have) || (z_off64_t)state->have > len ?
341 (unsigned)len : state->have;
345 len -= n;
362 int ZEXPORT gzread(file, buf, len)
365 unsigned len;
381 /* since an int is returned, make sure len fits in one, otherwise return
383 if ((int)len < 0) {
388 /* if len is zero, avoid unnecessary operations */
389 if (len == 0)
399 /* get len bytes to buf, or less than len if at the end */
404 n = state->have > len ? len : state->have;
414 /* need output data -- for small len or new stream load up our output
416 else if (state->how == LOOK || len < (state->size << 1)) {
425 /* large len -- read directly into user buffer */
427 if (gz_load(state, buf, len, &n) == -1)
431 /* large len -- decompress directly into user buffer */
433 strm->avail_out = len;
442 len -= n;
446 } while (len);
539 char * ZEXPORT gzgets(file, buf, len)
542 int len;
550 if (file == NULL || buf == NULL || len < 1)
565 /* copy output bytes up to new line or len - 1, whichever comes first --
569 left = (unsigned)len - 1;