MCPcopy Index your code
hub / github.com/hoothin/UserScripts / DeflateState

Function DeflateState

Picviewer CE+/dist.user.js:7225–7411  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7223
7224
7225function DeflateState() {
7226 this.strm = null; /* pointer back to this zlib stream */
7227 this.status = 0; /* as the name implies */
7228 this.pending_buf = null; /* output still pending */
7229 this.pending_buf_size = 0; /* size of pending_buf */
7230 this.pending_out = 0; /* next pending byte to output to the stream */
7231 this.pending = 0; /* nb of bytes in the pending buffer */
7232 this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */
7233 this.gzhead = null; /* gzip header information to write */
7234 this.gzindex = 0; /* where in extra, name, or comment */
7235 this.method = Z_DEFLATED; /* can only be DEFLATED */
7236 this.last_flush = -1; /* value of flush param for previous deflate call */
7237
7238 this.w_size = 0; /* LZ77 window size (32K by default) */
7239 this.w_bits = 0; /* log2(w_size) (8..16) */
7240 this.w_mask = 0; /* w_size - 1 */
7241
7242 this.window = null;
7243 /* Sliding window. Input bytes are read into the second half of the window,
7244 * and move to the first half later to keep a dictionary of at least wSize
7245 * bytes. With this organization, matches are limited to a distance of
7246 * wSize-MAX_MATCH bytes, but this ensures that IO is always
7247 * performed with a length multiple of the block size.
7248 */
7249
7250 this.window_size = 0;
7251 /* Actual size of window: 2*wSize, except when the user input buffer
7252 * is directly used as sliding window.
7253 */
7254
7255 this.prev = null;
7256 /* Link to older string with same hash index. To limit the size of this
7257 * array to 64K, this link is maintained only for the last 32K strings.
7258 * An index in this array is thus a window index modulo 32K.
7259 */
7260
7261 this.head = null; /* Heads of the hash chains or NIL. */
7262
7263 this.ins_h = 0; /* hash index of string to be inserted */
7264 this.hash_size = 0; /* number of elements in hash table */
7265 this.hash_bits = 0; /* log2(hash_size) */
7266 this.hash_mask = 0; /* hash_size-1 */
7267
7268 this.hash_shift = 0;
7269 /* Number of bits by which ins_h must be shifted at each input
7270 * step. It must be such that after MIN_MATCH steps, the oldest
7271 * byte no longer takes part in the hash key, that is:
7272 * hash_shift * MIN_MATCH >= hash_bits
7273 */
7274
7275 this.block_start = 0;
7276 /* Window position at the beginning of the current output block. Gets
7277 * negative when the window is moved backwards.
7278 */
7279
7280 this.match_length = 0; /* length of best match */
7281 this.prev_match = 0; /* previous match */
7282 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