mirror of
https://github.com/0x5eal/rbxts-pako.git
synced 2025-04-11 14:21:02 +01:00
deflate_state
reformatted
This commit is contained in:
parent
b4c0a04872
commit
3288124672
1 changed files with 28 additions and 44 deletions
|
@ -457,26 +457,23 @@ function lm_init(s) {
|
|||
}
|
||||
|
||||
function DeflateState() {
|
||||
this.status = 0;
|
||||
/* as the name implies */
|
||||
//this.pending_buf = Z_NULL; /* output still pending */
|
||||
this.pending_buf_size = 0;
|
||||
/* size of pending_buf */
|
||||
this.pending_out = 0;
|
||||
/* next pending byte to output to the stream */
|
||||
this.pending = 0;
|
||||
/* nb of bytes in the pending buffer */
|
||||
this.last_flush = Z_NULL;
|
||||
/* value of flush param for previous deflate call */
|
||||
// z_streamp strm; /* pointer back to this zlib stream */
|
||||
this.status = 0; /* as the name implies */
|
||||
// pending_buf = Z_NULL; /* output still pending */
|
||||
this.pending_buf_size = 0; /* size of pending_buf */
|
||||
this.pending_out = 0; /* next pending byte to output to the stream */
|
||||
this.pending = 0; /* nb of bytes in the pending buffer */
|
||||
this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */
|
||||
// gz_headerp gzhead; /* gzip header information to write */
|
||||
// uInt gzindex; /* where in extra, name, or comment */
|
||||
// Byte method; /* can only be DEFLATED */
|
||||
this.last_flush = Z_NULL; /* value of flush param for previous deflate call */
|
||||
|
||||
this.w_size = 0;
|
||||
/* LZ77 window size (32K by default) */
|
||||
this.w_bits = 0;
|
||||
/* log2(w_size) (8..16) */
|
||||
this.w_mask = 0;
|
||||
/* w_size - 1 */
|
||||
this.w_size = 0; /* LZ77 window size (32K by default) */
|
||||
this.w_bits = 0; /* log2(w_size) (8..16) */
|
||||
this.w_mask = 0; /* w_size - 1 */
|
||||
|
||||
//this.window = Z_NULL;
|
||||
this.window = null;
|
||||
/* Sliding window. Input bytes are read into the second half of the window,
|
||||
* and move to the first half later to keep a dictionary of at least wSize
|
||||
* bytes. With this organization, matches are limited to a distance of
|
||||
|
@ -495,17 +492,12 @@ function DeflateState() {
|
|||
* An index in this array is thus a window index modulo 32K.
|
||||
*/
|
||||
|
||||
this.head = null;
|
||||
/* Heads of the hash chains or NIL. */
|
||||
this.head = null; /* Heads of the hash chains or NIL. */
|
||||
|
||||
this.ins_h = 0;
|
||||
/* hash index of string to be inserted */
|
||||
this.hash_size = 0;
|
||||
/* number of elements in hash table */
|
||||
this.hash_bits = 0;
|
||||
/* log2(hash_size) */
|
||||
this.hash_mask = 0;
|
||||
/* hash_size-1 */
|
||||
this.ins_h = 0; /* hash index of string to be inserted */
|
||||
this.hash_size = 0; /* number of elements in hash table */
|
||||
this.hash_bits = 0; /* log2(hash_size) */
|
||||
this.hash_mask = 0; /* hash_size-1 */
|
||||
|
||||
this.hash_shift = 0;
|
||||
/* Number of bits by which ins_h must be shifted at each input
|
||||
|
@ -519,18 +511,12 @@ function DeflateState() {
|
|||
* negative when the window is moved backwards.
|
||||
*/
|
||||
|
||||
this.match_length = 0;
|
||||
/* length of best match */
|
||||
this.prev_match = 0;
|
||||
/* previous match */
|
||||
this.match_available = 1;
|
||||
/* set if previous match exists */
|
||||
this.strstart = 0;
|
||||
/* start of string to insert */
|
||||
this.match_start = 0;
|
||||
/* start of matching string */
|
||||
this.lookahead = 0;
|
||||
/* number of valid bytes ahead in window */
|
||||
this.match_length = 0; /* length of best match */
|
||||
this.prev_match = 0; /* previous match */
|
||||
this.match_available = 1; /* set if previous match exists */
|
||||
this.strstart = 0; /* start of string to insert */
|
||||
this.match_start = 0; /* start of matching string */
|
||||
this.lookahead = 0; /* number of valid bytes ahead in window */
|
||||
|
||||
this.prev_length = 0;
|
||||
/* Length of the best match at previous step. Matches not greater than this
|
||||
|
@ -554,10 +540,8 @@ function DeflateState() {
|
|||
* max_insert_length is used only for compression levels <= 3.
|
||||
*/
|
||||
|
||||
this.level = 0;
|
||||
/* compression level (1..9) */
|
||||
this.strategy = 0;
|
||||
/* favor or force Huffman coding*/
|
||||
this.level = 0; /* compression level (1..9) */
|
||||
this.strategy = 0; /* favor or force Huffman coding*/
|
||||
|
||||
this.good_match = 0;
|
||||
/* Use a faster search when the previous match is longer than this */
|
||||
|
|
Loading…
Add table
Reference in a new issue