MCPcopy Create free account
hub / github.com/TruthHun/BookStack / deflateEnd

Function deflateEnd

static/word2md/mammoth.browser.js:19967–19989  ·  view source on GitHub ↗
(strm)

Source from the content-addressed store, hash-verified

19965}
19966
19967function deflateEnd(strm) {
19968 var status;
19969
19970 if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {
19971 return Z_STREAM_ERROR;
19972 }
19973
19974 status = strm.state.status;
19975 if (status !== INIT_STATE &&
19976 status !== EXTRA_STATE &&
19977 status !== NAME_STATE &&
19978 status !== COMMENT_STATE &&
19979 status !== HCRC_STATE &&
19980 status !== BUSY_STATE &&
19981 status !== FINISH_STATE
19982 ) {
19983 return err(strm, Z_STREAM_ERROR);
19984 }
19985
19986 strm.state = null;
19987
19988 return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;
19989}
19990
19991
19992/* =========================================================================

Callers

nothing calls this directly

Calls 1

errFunction · 0.70

Tested by

no test coverage detected