msgpackr 1.9.7 → 1.9.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index-no-eval.cjs +4 -2
- package/dist/index-no-eval.cjs.map +1 -1
- package/dist/index-no-eval.min.js +1 -1
- package/dist/index-no-eval.min.js.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/node.cjs +4 -2
- package/dist/node.cjs.map +1 -1
- package/dist/test.js +4 -2
- package/dist/test.js.map +1 -1
- package/dist/unpack-no-eval.cjs +2 -2
- package/dist/unpack-no-eval.cjs.map +1 -1
- package/pack.js +2 -0
- package/package.json +1 -1
- package/unpack.js +2 -2
package/dist/index.js
CHANGED
|
@@ -169,8 +169,8 @@
|
|
|
169
169
|
}
|
|
170
170
|
return this.structures = loadedStructures
|
|
171
171
|
}
|
|
172
|
-
decode(source,
|
|
173
|
-
return this.unpack(source,
|
|
172
|
+
decode(source, options) {
|
|
173
|
+
return this.unpack(source, options)
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
function checkedRead(options) {
|
|
@@ -1164,6 +1164,7 @@
|
|
|
1164
1164
|
} else
|
|
1165
1165
|
position = (position + 7) & 0x7ffffff8; // Word align to make any future copying of this buffer faster
|
|
1166
1166
|
start = position;
|
|
1167
|
+
if (encodeOptions & RESERVE_START_SPACE) position += (encodeOptions & 0xff);
|
|
1167
1168
|
referenceMap = packr.structuredClone ? new Map() : null;
|
|
1168
1169
|
if (packr.bundleStrings && typeof value !== 'string') {
|
|
1169
1170
|
bundledStrings = [];
|
|
@@ -2127,6 +2128,7 @@
|
|
|
2127
2128
|
const { NEVER, ALWAYS, DECIMAL_ROUND, DECIMAL_FIT } = FLOAT32_OPTIONS;
|
|
2128
2129
|
const REUSE_BUFFER_MODE = 512;
|
|
2129
2130
|
const RESET_BUFFER_MODE = 1024;
|
|
2131
|
+
const RESERVE_START_SPACE = 2048;
|
|
2130
2132
|
|
|
2131
2133
|
/**
|
|
2132
2134
|
* Given an Iterable first argument, returns an Iterable where each value is packed as a Buffer
|