This commit is contained in:
dela
2026-02-21 18:27:49 +08:00
parent 0ac4b23f07
commit 5dc86ccfbf
270 changed files with 49508 additions and 4636 deletions

29
node_modules/msgpack-lite/lib/decoder.js generated vendored Normal file
View File

@@ -0,0 +1,29 @@
// decoder.js
exports.Decoder = Decoder;
var EventLite = require("event-lite");
var DecodeBuffer = require("./decode-buffer").DecodeBuffer;
function Decoder(options) {
if (!(this instanceof Decoder)) return new Decoder(options);
DecodeBuffer.call(this, options);
}
Decoder.prototype = new DecodeBuffer();
EventLite.mixin(Decoder.prototype);
Decoder.prototype.decode = function(chunk) {
if (arguments.length) this.write(chunk);
this.flush();
};
Decoder.prototype.push = function(chunk) {
this.emit("data", chunk);
};
Decoder.prototype.end = function(chunk) {
this.decode(chunk);
this.emit("end");
};