mirror of
https://github.com/LukeHagar/relay.git
synced 2025-12-07 20:57:45 +00:00
saving
This commit is contained in:
32
node_modules/@msgpack/msgpack/dist/decode.js
generated
vendored
Normal file
32
node_modules/@msgpack/msgpack/dist/decode.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.decodeMulti = exports.decode = exports.defaultDecodeOptions = void 0;
|
||||
const Decoder_1 = require("./Decoder");
|
||||
exports.defaultDecodeOptions = {};
|
||||
/**
|
||||
* It decodes a single MessagePack object in a buffer.
|
||||
*
|
||||
* This is a synchronous decoding function.
|
||||
* See other variants for asynchronous decoding: {@link decodeAsync()}, {@link decodeStream()}, or {@link decodeArrayStream()}.
|
||||
*
|
||||
* @throws {@link RangeError} if the buffer is incomplete, including the case where the buffer is empty.
|
||||
* @throws {@link DecodeError} if the buffer contains invalid data.
|
||||
*/
|
||||
function decode(buffer, options = exports.defaultDecodeOptions) {
|
||||
const decoder = new Decoder_1.Decoder(options.extensionCodec, options.context, options.maxStrLength, options.maxBinLength, options.maxArrayLength, options.maxMapLength, options.maxExtLength);
|
||||
return decoder.decode(buffer);
|
||||
}
|
||||
exports.decode = decode;
|
||||
/**
|
||||
* It decodes multiple MessagePack objects in a buffer.
|
||||
* This is corresponding to {@link decodeMultiStream()}.
|
||||
*
|
||||
* @throws {@link RangeError} if the buffer is incomplete, including the case where the buffer is empty.
|
||||
* @throws {@link DecodeError} if the buffer contains invalid data.
|
||||
*/
|
||||
function decodeMulti(buffer, options = exports.defaultDecodeOptions) {
|
||||
const decoder = new Decoder_1.Decoder(options.extensionCodec, options.context, options.maxStrLength, options.maxBinLength, options.maxArrayLength, options.maxMapLength, options.maxExtLength);
|
||||
return decoder.decodeMulti(buffer);
|
||||
}
|
||||
exports.decodeMulti = decodeMulti;
|
||||
//# sourceMappingURL=decode.js.map
|
||||
Reference in New Issue
Block a user