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

Function deflateResetKeep

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

Source from the content-addressed store, hash-verified

19502
19503
19504function deflateResetKeep(strm) {
19505 var s;
19506
19507 if (!strm || !strm.state) {
19508 return err(strm, Z_STREAM_ERROR);
19509 }
19510
19511 strm.total_in = strm.total_out = 0;
19512 strm.data_type = Z_UNKNOWN;
19513
19514 s = strm.state;
19515 s.pending = 0;
19516 s.pending_out = 0;
19517
19518 if (s.wrap < 0) {
19519 s.wrap = -s.wrap;
19520 /* was made negative by deflate(..., Z_FINISH); */
19521 }
19522 s.status = (s.wrap ? INIT_STATE : BUSY_STATE);
19523 strm.adler = (s.wrap === 2) ?
19524 0 // crc32(0, Z_NULL, 0)
19525 :
19526 1; // adler32(0, Z_NULL, 0)
19527 s.last_flush = Z_NO_FLUSH;
19528 trees._tr_init(s);
19529 return Z_OK;
19530}
19531
19532
19533function deflateReset(strm) {

Callers 1

deflateResetFunction · 0.70

Calls 1

errFunction · 0.70

Tested by

no test coverage detected