Return when Finish() is called (makes it easier when we add stream comp)
This commit is contained in:
@@ -400,8 +400,6 @@ class WTVLzpf {
|
|||||||
this.EncodeLiteral(code_length, code);
|
this.EncodeLiteral(code_length, code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Buffer.from(this.encoded_data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -442,6 +440,8 @@ class WTVLzpf {
|
|||||||
// End
|
// End
|
||||||
this.AddByte((this.current_literal >>> 0x18) & 0xFF);
|
this.AddByte((this.current_literal >>> 0x18) & 0xFF);
|
||||||
this.AddByte(0x20);
|
this.AddByte(0x20);
|
||||||
|
|
||||||
|
return Buffer.from(this.encoded_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -467,9 +467,7 @@ class WTVLzpf {
|
|||||||
uncompressed_data = this.ConvertToBuffer(uncompressed_data);
|
uncompressed_data = this.ConvertToBuffer(uncompressed_data);
|
||||||
this.Begin();
|
this.Begin();
|
||||||
this.EncodeBlock(uncompressed_data, true);
|
this.EncodeBlock(uncompressed_data, true);
|
||||||
this.Finish();
|
return this.Finish();
|
||||||
|
|
||||||
return Buffer.from(this.encoded_data);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user