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

Function deflateGetDictionary

freebsd/contrib/zlib/deflate.c:448–467  ·  view source on GitHub ↗

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

(strm, dictionary, dictLength)

Source from the content-addressed store, hash-verified

446
447/* ========================================================================= */
448int ZEXPORT deflateGetDictionary (strm, dictionary, dictLength)
449 z_streamp strm;
450 Bytef *dictionary;
451 uInt *dictLength;
452{
453 deflate_state *s;
454 uInt len;
455
456 if (deflateStateCheck(strm))
457 return Z_STREAM_ERROR;
458 s = strm->state;
459 len = s->strstart + s->lookahead;
460 if (len > s->w_size)
461 len = s->w_size;
462 if (dictionary != Z_NULL && len)
463 zmemcpy(dictionary, s->window + s->strstart + s->lookahead - len, len);
464 if (dictLength != Z_NULL)
465 *dictLength = len;
466 return Z_OK;
467}
468
469/* ========================================================================= */
470int ZEXPORT deflateResetKeep (strm)

Callers

nothing calls this directly

Calls 2

deflateStateCheckFunction · 0.85
zmemcpyFunction · 0.85

Tested by

no test coverage detected