MCPcopy Create free account
hub / github.com/MariaDB/server / deflateStateCheck

Function deflateStateCheck

zlib/deflate.c:538–556  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

536 * Check for a valid deflate stream state. Return 0 if ok, 1 if not.
537 */
538local int deflateStateCheck(z_streamp strm) {
539 deflate_state *s;
540 if (strm == Z_NULL ||
541 strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0)
542 return 1;
543 s = strm->state;
544 if (s == Z_NULL || s->strm != strm || (s->status != INIT_STATE &&
545#ifdef GZIP
546 s->status != GZIP_STATE &&
547#endif
548 s->status != EXTRA_STATE &&
549 s->status != NAME_STATE &&
550 s->status != COMMENT_STATE &&
551 s->status != HCRC_STATE &&
552 s->status != BUSY_STATE &&
553 s->status != FINISH_STATE))
554 return 1;
555 return 0;
556}
557
558/* ========================================================================= */
559int ZEXPORT deflateSetDictionary(z_streamp strm, const Bytef *dictionary,

Callers 13

deflateSetDictionaryFunction · 0.85
deflateGetDictionaryFunction · 0.85
deflate.cFile · 0.85
deflateSetHeaderFunction · 0.85
deflatePendingFunction · 0.85
deflateUsedFunction · 0.85
deflatePrimeFunction · 0.85
deflateParamsFunction · 0.85
deflateTuneFunction · 0.85
deflateBound_zFunction · 0.85
deflateFunction · 0.85
deflateEndFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected