mirror of
https://github.com/0x5eal/rbxts-pako.git
synced 2025-04-04 10:50:59 +01:00
cleared unnecessary var casts
This commit is contained in:
parent
1a32aea787
commit
fcd6db56b7
2 changed files with 9 additions and 15 deletions
|
@ -533,8 +533,7 @@ function deflate_fast(s, flush) {
|
|||
if (s.lookahead >= MIN_MATCH) {
|
||||
/*** INSERT_STRING(s, s.strstart, hash_head); ***/
|
||||
s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
|
||||
hash_head = (s.head[s.ins_h] & 0xffff);
|
||||
s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
|
||||
hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
|
||||
s.head[s.ins_h] = s.strstart;
|
||||
/***/
|
||||
}
|
||||
|
@ -568,8 +567,7 @@ function deflate_fast(s, flush) {
|
|||
s.strstart++;
|
||||
/*** INSERT_STRING(s, s.strstart, hash_head); ***/
|
||||
s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
|
||||
hash_head = (s.head[s.ins_h] & 0xffff);
|
||||
s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
|
||||
hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
|
||||
s.head[s.ins_h] = s.strstart;
|
||||
/***/
|
||||
/* strstart never exceeds WSIZE-MAX_MATCH, so there are
|
||||
|
@ -664,8 +662,7 @@ function deflate_slow(s, flush) {
|
|||
if (s.lookahead >= MIN_MATCH) {
|
||||
/*** INSERT_STRING(s, s.strstart, hash_head); ***/
|
||||
s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
|
||||
hash_head = (s.head[s.ins_h] & 0xffff);
|
||||
s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
|
||||
hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
|
||||
s.head[s.ins_h] = s.strstart;
|
||||
/***/
|
||||
}
|
||||
|
@ -718,8 +715,7 @@ function deflate_slow(s, flush) {
|
|||
if (++s.strstart <= max_insert) {
|
||||
/*** INSERT_STRING(s, s.strstart, hash_head); ***/
|
||||
s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
|
||||
hash_head = (s.head[s.ins_h] & 0xffff);
|
||||
s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
|
||||
hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
|
||||
s.head[s.ins_h] = s.strstart;
|
||||
/***/
|
||||
}
|
||||
|
|
|
@ -159,16 +159,14 @@ function put_short (s, w) {
|
|||
* IN assertion: length <= 16 and value fits in length bits.
|
||||
*/
|
||||
function send_bits(s, value, length) {
|
||||
var len = length, val;
|
||||
if (s.bi_valid > (Buf_size - len)) {
|
||||
val = value;
|
||||
s.bi_buf |= (val << s.bi_valid) & 0xffff;
|
||||
if (s.bi_valid > (Buf_size - length)) {
|
||||
s.bi_buf |= (value << s.bi_valid) & 0xffff;
|
||||
put_short(s, s.bi_buf);
|
||||
s.bi_buf = val >> (Buf_size - s.bi_valid);
|
||||
s.bi_valid += len - Buf_size;
|
||||
s.bi_buf = value >> (Buf_size - s.bi_valid);
|
||||
s.bi_valid += length - Buf_size;
|
||||
} else {
|
||||
s.bi_buf |= (value << s.bi_valid) & 0xffff;
|
||||
s.bi_valid += len;
|
||||
s.bi_valid += length;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue