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

Function DeflateState

static/word2md/mammoth.browser.js:19315–19501  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19313
19314
19315function DeflateState() {
19316 this.strm = null; /* pointer back to this zlib stream */
19317 this.status = 0; /* as the name implies */
19318 this.pending_buf = null; /* output still pending */
19319 this.pending_buf_size = 0; /* size of pending_buf */
19320 this.pending_out = 0; /* next pending byte to output to the stream */
19321 this.pending = 0; /* nb of bytes in the pending buffer */
19322 this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */
19323 this.gzhead = null; /* gzip header information to write */
19324 this.gzindex = 0; /* where in extra, name, or comment */
19325 this.method = Z_DEFLATED; /* can only be DEFLATED */
19326 this.last_flush = -1; /* value of flush param for previous deflate call */
19327
19328 this.w_size = 0; /* LZ77 window size (32K by default) */
19329 this.w_bits = 0; /* log2(w_size) (8..16) */
19330 this.w_mask = 0; /* w_size - 1 */
19331
19332 this.window = null;
19333 /* Sliding window. Input bytes are read into the second half of the window,
19334 * and move to the first half later to keep a dictionary of at least wSize
19335 * bytes. With this organization, matches are limited to a distance of
19336 * wSize-MAX_MATCH bytes, but this ensures that IO is always
19337 * performed with a length multiple of the block size.
19338 */
19339
19340 this.window_size = 0;
19341 /* Actual size of window: 2*wSize, except when the user input buffer
19342 * is directly used as sliding window.
19343 */
19344
19345 this.prev = null;
19346 /* Link to older string with same hash index. To limit the size of this
19347 * array to 64K, this link is maintained only for the last 32K strings.
19348 * An index in this array is thus a window index modulo 32K.
19349 */
19350
19351 this.head = null; /* Heads of the hash chains or NIL. */
19352
19353 this.ins_h = 0; /* hash index of string to be inserted */
19354 this.hash_size = 0; /* number of elements in hash table */
19355 this.hash_bits = 0; /* log2(hash_size) */
19356 this.hash_mask = 0; /* hash_size-1 */
19357
19358 this.hash_shift = 0;
19359 /* Number of bits by which ins_h must be shifted at each input
19360 * step. It must be such that after MIN_MATCH steps, the oldest
19361 * byte no longer takes part in the hash key, that is:
19362 * hash_shift * MIN_MATCH >= hash_bits
19363 */
19364
19365 this.block_start = 0;
19366 /* Window position at the beginning of the current output block. Gets
19367 * negative when the window is moved backwards.
19368 */
19369
19370 this.match_length = 0; /* length of best match */
19371 this.prev_match = 0; /* previous match */
19372 this.match_available = 0; /* set if previous match exists */

Callers

nothing calls this directly

Calls 1

zeroFunction · 0.70

Tested by

no test coverage detected