MCPcopy Create free account
hub / github.com/F-Stack/f-stack / deflateStateCheck

Function deflateStateCheck

freebsd/contrib/zlib/deflate.c:356–376  ·  view source on GitHub ↗

========================================================================= * Check for a valid deflate stream state. Return 0 if ok, 1 if not. */

(strm)

Source from the content-addressed store, hash-verified

354 * Check for a valid deflate stream state. Return 0 if ok, 1 if not.
355 */
356local int deflateStateCheck (strm)
357 z_streamp strm;
358{
359 deflate_state *s;
360 if (strm == Z_NULL ||
361 strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0)
362 return 1;
363 s = strm->state;
364 if (s == Z_NULL || s->strm != strm || (s->status != INIT_STATE &&
365#ifdef GZIP
366 s->status != GZIP_STATE &&
367#endif
368 s->status != EXTRA_STATE &&
369 s->status != NAME_STATE &&
370 s->status != COMMENT_STATE &&
371 s->status != HCRC_STATE &&
372 s->status != BUSY_STATE &&
373 s->status != FINISH_STATE))
374 return 1;
375 return 0;
376}
377
378/* ========================================================================= */
379int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)

Callers 12

deflateSetDictionaryFunction · 0.85
deflateGetDictionaryFunction · 0.85
deflate.cFile · 0.85
deflateSetHeaderFunction · 0.85
deflatePendingFunction · 0.85
deflatePrimeFunction · 0.85
deflateParamsFunction · 0.85
deflateTuneFunction · 0.85
deflateBoundFunction · 0.85
deflateFunction · 0.85
deflateEndFunction · 0.85
deflateCopyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected