|
Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
| struct | point |
Macros | |
| #define | WINSIZE 32768U /* sliding window size */ |
| #define | CHUNK 16384 /* file input buffer size */ |
Functions | |
| void | deflate_index_free (struct deflate_index *index) |
| static struct deflate_index * | addpoint (struct deflate_index *index, int bits, off_t in, off_t out, unsigned left, unsigned char *window) |
| int | deflate_index_build (FILE *in, off_t span, struct deflate_index **built) |
| int | deflate_index_extract (FILE *in, struct deflate_index *index, off_t offset, unsigned char *buf, int len) |
|
static |
Definition at line 89 of file zran.c.
References bits(), point::bits, deflate_index_free(), free(), deflate_index::gzip, deflate_index::have, in, point::in, deflate_index::list, malloc(), memcpy(), NULL, out, point::out, realloc(), point::window, and WINSIZE.
Referenced by deflate_index_build().
| int deflate_index_build | ( | FILE * | in, |
| off_t | span, | ||
| struct deflate_index ** | built | ||
| ) |
Definition at line 135 of file zran.c.
References addpoint(), lzma_stream::avail_in, lzma_stream::avail_out, CHUNK, deflate_index_free(), deflate_index::gzip, deflate_index::have, in, inflate(), inflateEnd(), inflateInit2, inflateReset(), input(), deflate_index::length, deflate_index::list, lzma_stream::next_in, lzma_stream::next_out, NULL, realloc(), strm, WINSIZE, Z_BLOCK, Z_DATA_ERROR, Z_ERRNO, Z_MEM_ERROR, Z_NEED_DICT, Z_NULL, Z_OK, and Z_STREAM_END.
| int deflate_index_extract | ( | FILE * | in, |
| struct deflate_index * | index, | ||
| off_t | offset, | ||
| unsigned char * | buf, | ||
| int | len | ||
| ) |
Definition at line 248 of file zran.c.
References lzma_stream::avail_in, lzma_stream::avail_out, point::bits, CHUNK, fseeko, deflate_index::gzip, deflate_index::have, in, point::in, inflate(), inflateEnd(), inflateInit2, inflatePrime(), inflateReset2(), inflateSetDictionary(), input(), len, deflate_index::list, lzma_stream::next_in, lzma_stream::next_out, out, point::out, SEEK_CUR, SEEK_SET, skip(), strm, unsigned, point::window, WINSIZE, Z_BLOCK, Z_DATA_ERROR, Z_ERRNO, Z_MEM_ERROR, Z_NEED_DICT, Z_NO_FLUSH, Z_NULL, Z_OK, and Z_STREAM_END.
| void deflate_index_free | ( | struct deflate_index * | index | ) |
Definition at line 76 of file zran.c.
References free(), deflate_index::list, and NULL.
Referenced by addpoint(), and deflate_index_build().