Lines Matching refs:stream
64 #define SAFE_MSG(sp) ((sp)->stream.msg == NULL ? "" : (sp)->stream.msg)
72 z_stream stream; member
106 deflateEnd(&sp->stream); in ZIPSetupDecode()
110 if (inflateInit(&sp->stream) != Z_OK) { in ZIPSetupDecode()
134 sp->stream.next_in = tif->tif_rawdata; in ZIPPreDecode()
135 assert(sizeof(sp->stream.avail_in)==4); /* if this assert gets raised, in ZIPPreDecode()
139 sp->stream.avail_in = (uInt) tif->tif_rawcc; in ZIPPreDecode()
140 if ((tmsize_t)sp->stream.avail_in != tif->tif_rawcc) in ZIPPreDecode()
145 return (inflateReset(&sp->stream) == Z_OK); in ZIPPreDecode()
158 sp->stream.next_in = tif->tif_rawcp; in ZIPDecode()
159 sp->stream.avail_in = (uInt) tif->tif_rawcc; in ZIPDecode()
161 sp->stream.next_out = op; in ZIPDecode()
162 assert(sizeof(sp->stream.avail_out)==4); /* if this assert gets raised, in ZIPDecode()
166 sp->stream.avail_out = (uInt) occ; in ZIPDecode()
167 if ((tmsize_t)sp->stream.avail_out != occ) in ZIPDecode()
173 int state = inflate(&sp->stream, Z_PARTIAL_FLUSH); in ZIPDecode()
180 if (inflateSync(&sp->stream) != Z_OK) in ZIPDecode()
189 } while (sp->stream.avail_out > 0); in ZIPDecode()
190 if (sp->stream.avail_out != 0) { in ZIPDecode()
193 (unsigned long) tif->tif_row, (TIFF_UINT64_T) sp->stream.avail_out); in ZIPDecode()
197 tif->tif_rawcp = sp->stream.next_in; in ZIPDecode()
198 tif->tif_rawcc = sp->stream.avail_in; in ZIPDecode()
211 inflateEnd(&sp->stream); in ZIPSetupEncode()
215 if (deflateInit(&sp->stream, sp->zipquality) != Z_OK) { in ZIPSetupEncode()
238 sp->stream.next_out = tif->tif_rawdata; in ZIPPreEncode()
239 assert(sizeof(sp->stream.avail_out)==4); /* if this assert gets raised, in ZIPPreEncode()
243 sp->stream.avail_out = (uInt)tif->tif_rawdatasize; in ZIPPreEncode()
244 if ((tmsize_t)sp->stream.avail_out != tif->tif_rawdatasize) in ZIPPreEncode()
249 return (deflateReset(&sp->stream) == Z_OK); in ZIPPreEncode()
265 sp->stream.next_in = bp; in ZIPEncode()
266 assert(sizeof(sp->stream.avail_in)==4); /* if this assert gets raised, in ZIPEncode()
270 sp->stream.avail_in = (uInt) cc; in ZIPEncode()
271 if ((tmsize_t)sp->stream.avail_in != cc) in ZIPEncode()
277 if (deflate(&sp->stream, Z_NO_FLUSH) != Z_OK) { in ZIPEncode()
283 if (sp->stream.avail_out == 0) { in ZIPEncode()
286 sp->stream.next_out = tif->tif_rawdata; in ZIPEncode()
287 …sp->stream.avail_out = (uInt) tif->tif_rawdatasize; /* this is a safe typecast, as check is made … in ZIPEncode()
289 } while (sp->stream.avail_in > 0); in ZIPEncode()
304 sp->stream.avail_in = 0; in ZIPPostEncode()
306 state = deflate(&sp->stream, Z_FINISH); in ZIPPostEncode()
310 if ((tmsize_t)sp->stream.avail_out != tif->tif_rawdatasize) in ZIPPostEncode()
312 tif->tif_rawcc = tif->tif_rawdatasize - sp->stream.avail_out; in ZIPPostEncode()
314 sp->stream.next_out = tif->tif_rawdata; in ZIPPostEncode()
315 …sp->stream.avail_out = (uInt) tif->tif_rawdatasize; /* this is a safe typecast, as check is made … in ZIPPostEncode()
340 deflateEnd(&sp->stream); in ZIPCleanup()
343 inflateEnd(&sp->stream); in ZIPCleanup()
362 if (deflateParams(&sp->stream, in ZIPVSetField()
420 sp->stream.zalloc = NULL; in TIFFInitZIP()
421 sp->stream.zfree = NULL; in TIFFInitZIP()
422 sp->stream.opaque = NULL; in TIFFInitZIP()
423 sp->stream.data_type = Z_BINARY; in TIFFInitZIP()