33 while (gzip->
strm.avail_out > 0) {
34 if (gzip->
strm.avail_in == 0) {
40 gzip->
strm.avail_in = readsize;
49 int ret = inflate(&gzip->
strm, Z_NO_FLUSH);
51 if (!
ELEM(
ret, Z_OK, Z_BUF_ERROR)) {
65 if (inflateEnd(&gzip->
strm) != Z_OK) {
66 printf(
"close gzip stream error\n");
79 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)
FileReader * BLI_filereader_new_gzip(FileReader *base)
static void gzip_close(FileReader *reader)
static ssize_t gzip_read(FileReader *reader, void *buffer, size_t size)
ccl_global float * buffer
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)