msgpackr 1.9.6 → 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 +24 -19
- package/dist/node.cjs.map +1 -1
- package/dist/test.js +24 -19
- 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/struct.js +20 -17
- package/unpack.js +2 -2
package/dist/index-no-eval.cjs
CHANGED
|
@@ -170,8 +170,8 @@
|
|
|
170
170
|
}
|
|
171
171
|
return this.structures = loadedStructures
|
|
172
172
|
}
|
|
173
|
-
decode(source,
|
|
174
|
-
return this.unpack(source,
|
|
173
|
+
decode(source, options) {
|
|
174
|
+
return this.unpack(source, options)
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
function checkedRead(options) {
|
|
@@ -1165,6 +1165,7 @@
|
|
|
1165
1165
|
} else
|
|
1166
1166
|
position = (position + 7) & 0x7ffffff8; // Word align to make any future copying of this buffer faster
|
|
1167
1167
|
start = position;
|
|
1168
|
+
if (encodeOptions & RESERVE_START_SPACE) position += (encodeOptions & 0xff);
|
|
1168
1169
|
referenceMap = packr.structuredClone ? new Map() : null;
|
|
1169
1170
|
if (packr.bundleStrings && typeof value !== 'string') {
|
|
1170
1171
|
bundledStrings = [];
|
|
@@ -2128,6 +2129,7 @@
|
|
|
2128
2129
|
const { NEVER, ALWAYS, DECIMAL_ROUND, DECIMAL_FIT } = FLOAT32_OPTIONS;
|
|
2129
2130
|
const REUSE_BUFFER_MODE = 512;
|
|
2130
2131
|
const RESET_BUFFER_MODE = 1024;
|
|
2132
|
+
const RESERVE_START_SPACE = 2048;
|
|
2131
2133
|
|
|
2132
2134
|
/**
|
|
2133
2135
|
* Given an Iterable first argument, returns an Iterable where each value is packed as a Buffer
|