v0.9.18
- numerous bug fixes
- too much to remember
- rewrote sync system yet again
- more classes
- WTVShared class for shared functions
- clientShowAlert class for easy client:showalert urls
- User File Store
- Can upload with PUT commands in wtv-disk
- Programmically access files with new functions in WTVClientSessionData
- TODO: file browser
- other stuff I can't remember
- work on post data bug
- proper gzip download for disk system (aka WNI reinventing the Content-Encoding: gzip wheel)
- send Last-Modified for static files
- send wtv-checksum for all disk system downloads
- update to v90 modem firmware
- offer kflex with `Old` diskmap
This commit is contained in:
@@ -400,8 +400,6 @@ class WTVLzpf {
|
||||
this.EncodeLiteral(code_length, code);
|
||||
}
|
||||
}
|
||||
|
||||
return Buffer.from(this.encoded_data);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -442,32 +440,26 @@ class WTVLzpf {
|
||||
// End
|
||||
this.AddByte((this.current_literal >>> 0x18) & 0xFF);
|
||||
this.AddByte(0x20);
|
||||
|
||||
return Buffer.from(this.encoded_data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the data to a Javascript Buffer object
|
||||
*
|
||||
* @param data {String|Buffer|CryptoJS.lib.WordArray} Data to convert
|
||||
* @param data {String|Buffer} Data to convert
|
||||
*
|
||||
* @returns {Buffer} Javascript Buffer object
|
||||
*/
|
||||
ConvertToBuffer(data) {
|
||||
if (data.words) {
|
||||
var WTVSec = require("./WTVSec.js");
|
||||
wtvsec = new WTVSec(1);
|
||||
data = wtvsec.wordArrayToBuffer(data);
|
||||
WTVSec, wtvsec = null;
|
||||
} else if (!data.byteLength) {
|
||||
// otherwise if its not already a Buffer, convert it to one
|
||||
data = new Buffer.from(data);
|
||||
}
|
||||
data = new Buffer.from(data.toString('binary'));
|
||||
return data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compress data using WebTV's Lzpf compression algorithm and adds the footer to the end.
|
||||
*
|
||||
* @param uncompressed_data {String|Buffer|CryptoJS.lib.WordArray} data to compress
|
||||
* @param uncompressed_data {String|Buffer} data to compress
|
||||
*
|
||||
* @returns {Buffer} Lzpf compression data
|
||||
*/
|
||||
@@ -475,9 +467,7 @@ class WTVLzpf {
|
||||
uncompressed_data = this.ConvertToBuffer(uncompressed_data);
|
||||
this.Begin();
|
||||
this.EncodeBlock(uncompressed_data, true);
|
||||
this.Finish();
|
||||
|
||||
return Buffer.from(this.encoded_data);
|
||||
return this.Finish();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user