this might be crazy but it appears to help a bit (at least on the ServeLegal page)
This commit is contained in:
@@ -15,12 +15,12 @@ class WTVLzpf {
|
||||
|
||||
current_length = 0;
|
||||
current_literal = 0;
|
||||
flag = 0xFFFF;
|
||||
flag = 0xFFFFFFFF;
|
||||
working_data = 0;
|
||||
match_index = 0;
|
||||
type_index = 0;
|
||||
checksum = 0;
|
||||
flag_table = new Uint16Array(0x1000)
|
||||
flag_table = new Uint32Array(0x1000)
|
||||
ring_buffer = new Uint8Array(0x2000)
|
||||
encoded_data = [];
|
||||
|
||||
@@ -283,13 +283,13 @@ class WTVLzpf {
|
||||
clear() {
|
||||
this.current_length = 0;
|
||||
this.current_literal = 0;
|
||||
this.flag = 0xFFFF;
|
||||
this.flag = 0xFFFFFFFF;
|
||||
this.working_data = 0;
|
||||
this.match_index = 0;
|
||||
this.type_index = 0;
|
||||
this.checksum = 0;
|
||||
this.ring_buffer.fill(0x00, 0, 0x2000)
|
||||
this.flag_table.fill(0xFFFF, 0, 0x1000);
|
||||
this.flag_table.fill(0xFFFFFFFF, 0, 0x1000);
|
||||
this.encoded_data = [];
|
||||
}
|
||||
|
||||
@@ -364,28 +364,28 @@ class WTVLzpf {
|
||||
this.type_index = 3;
|
||||
} else {
|
||||
this.match_index = (this.match_index + 1) & 0x1FFF;
|
||||
this.flag = (this.flag + 1) & 0x1FFF;
|
||||
this.flag = (this.flag + 1) & 0x1FFFFFFF;
|
||||
this.checksum = (this.checksum + byte) & 0xFFFF;
|
||||
this.working_data = ((this.working_data * 0x0100) + byte) & 0xFFFFFFFF;
|
||||
i++;
|
||||
}
|
||||
} else {
|
||||
this.flag = 0xFFFF;
|
||||
this.flag = 0xFFFFFFFF;
|
||||
|
||||
if (i >= 3) {
|
||||
flags_index = (this.working_data >>> 0x0B ^ this.working_data) & 0x0FFF;
|
||||
this.flag = this.flag_table[flags_index];
|
||||
this.flag_table[flags_index] = i & 0x1FFF;
|
||||
this.flag_table[flags_index] = i & 0x1FFFFFFF;
|
||||
} else {
|
||||
this.type_index++;
|
||||
}
|
||||
|
||||
if (this.flag == 0xFFFF) {
|
||||
if (this.flag == 0xFFFFFFFF) {
|
||||
code_length = this.nomatchEncode[byte][1];
|
||||
code = this.nomatchEncode[byte][0] << 0x10;
|
||||
} else if (byte == this.ring_buffer[this.flag] && compress_data) {
|
||||
this.match_index = 1;
|
||||
this.flag = (this.flag + 1) & 0x1FFF;
|
||||
this.flag = (this.flag + 1) & 0x1FFFFFFF;
|
||||
this.type_index = 4;
|
||||
} else {
|
||||
code_length = this.nomatchEncode[byte][1] + 1;
|
||||
@@ -427,7 +427,7 @@ class WTVLzpf {
|
||||
|
||||
var flags_index = (this.working_data >>> 0x0B ^ this.working_data) & 0x0FFF;
|
||||
var flag = this.flag_table[flags_index];
|
||||
if (flag == 0xFFFF) {
|
||||
if (flag == 0xFFFFFFFF) {
|
||||
this.EncodeLiteral(0x10, 0x00990000);
|
||||
} else {
|
||||
this.EncodeLiteral(0x11, 0x004c8000);
|
||||
|
||||
Reference in New Issue
Block a user