MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / deflateGetDictionary

Function deflateGetDictionary

extern/zlib/src/deflate.c:616–632  ·  view source on GitHub ↗

========================================================================= */

Source from the content-addressed store, hash-verified

614
615/* ========================================================================= */
616int ZEXPORT deflateGetDictionary(z_streamp strm, Bytef *dictionary,
617 uInt *dictLength) {
618 deflate_state *s;
619 uInt len;
620
621 if (deflateStateCheck(strm))
622 return Z_STREAM_ERROR;
623 s = strm->state;
624 len = s->strstart + s->lookahead;
625 if (len > s->w_size)
626 len = s->w_size;
627 if (dictionary != Z_NULL && len)
628 zmemcpy(dictionary, s->window + s->strstart + s->lookahead - len, len);
629 if (dictLength != Z_NULL)
630 *dictLength = len;
631 return Z_OK;
632}
633
634/* ========================================================================= */
635int ZEXPORT deflateResetKeep(z_streamp strm) {

Callers

nothing calls this directly

Calls 2

deflateStateCheckFunction · 0.85
zmemcpyFunction · 0.85

Tested by

no test coverage detected