Lines Matching defs:len
242 /* Use the index to read len bytes from offset into buf, return bytes read or
245 than len, indicating how much as actually read into buf. This function
250 unsigned char *buf, int len)
259 if (len < 0)
297 strm.avail_out = len;
343 ret = skip ? 0 : len - strm.avail_out;
356 int len;
374 len = build_index(in, SPAN, &index);
375 if (len < 0) {
377 switch (len) {
388 fprintf(stderr, "zran: error %d while building index\n", len);
392 fprintf(stderr, "zran: built index with %d access points\n", len);
396 len = extract(in, index, offset, buf, CHUNK);
397 if (len < 0)
399 len == Z_MEM_ERROR ? "out of memory" : "input corrupted");
401 fwrite(buf, 1, len, stdout);
402 fprintf(stderr, "zran: extracted %d bytes at %llu\n", len, offset);