Go to the documentation of this file.
63 #define WINSIZE 32768U
93 off_t
in, off_t
out,
unsigned left,
unsigned char *window)
100 if (
index == NULL)
return NULL;
101 index->list = malloc(
sizeof(
struct point) << 3);
102 if (
index->list == NULL) {
167 totin = totout = last = 0;
175 goto build_index_error;
179 goto build_index_error;
201 goto build_index_error;
215 (totout == 0 || totout - last > span)) {
220 goto build_index_error;
250 unsigned char *
buf,
int len)
256 unsigned char discard[
WINSIZE];
354 int main(
int argc,
char **argv)
364 fprintf(
stderr,
"usage: zran file.gz\n");
367 in = fopen(argv[1],
"rb");
369 fprintf(
stderr,
"zran: could not open %s for reading\n", argv[1]);
379 fprintf(
stderr,
"zran: out of memory\n");
382 fprintf(
stderr,
"zran: compressed data error in %s\n", argv[1]);
385 fprintf(
stderr,
"zran: read error on %s\n", argv[1]);
388 fprintf(
stderr,
"zran: error %d while building index\n",
len);
392 fprintf(
stderr,
"zran: built index with %d access points\n",
len);
398 fprintf(
stderr,
"zran: extraction failed: %s error\n",
int ZEXPORT inflateEnd(z_streamp strm)
struct access * addpoint(struct access *index, int bits, off_t in, off_t out, unsigned left, unsigned char *window)
int ZEXPORT inflate(z_streamp strm, int flush)
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
void free_index(struct access *index)
OPENSSL_EXPORT ASN1_BIT_STRING * bits
int extract(FILE *in, struct access *index, off_t offset, unsigned char *buf, int len)
int ZEXPORT inflatePrime(z_streamp strm, int bits, int value)
int main(int argc, char **argv)
int build_index(FILE *in, off_t span, struct access **built)
UniquePtr< SSL_SESSION > ret
AllocList * next[kMaxLevel]
int ZEXPORT inflateSetDictionary(z_streamp strm, const Bytef *dictionary, uInt dictLength)
unsigned char window[WINSIZE]
#define inflateInit2(strm, windowBits)
grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:01