32 gzip->
strm.next_out =
static_cast<Bytef *
>(buffer);
34 while (gzip->
strm.avail_out > 0) {
35 if (gzip->
strm.avail_in == 0) {
41 gzip->
strm.avail_in = readsize;
42 gzip->
strm.next_in =
static_cast<Bytef *
>(gzip->
in_buf);
50 int ret = inflate(&gzip->
strm, Z_NO_FLUSH);
52 if (!
ELEM(
ret, Z_OK, Z_BUF_ERROR)) {
66 if (inflateEnd(&gzip->
strm) != Z_OK) {
67 printf(
"close gzip stream error\n");
80 if (inflateInit2(&gzip->
strm, 16 + MAX_WBITS) != Z_OK) {
Wrapper for reading from various sources (e.g. raw files, compressed files, memory....
Read Guarded memory(de)allocation.
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
static int64_t gzip_read(FileReader *reader, void *buffer, size_t size)
static void gzip_close(FileReader *reader)
FileReader * BLI_filereader_new_gzip(FileReader *base)
void * MEM_mallocN(size_t len, const char *str)
void * MEM_callocN(size_t len, const char *str)
void MEM_freeN(void *vmemh)