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/test.js CHANGED
@@ -173,8 +173,8 @@
173
173
  }
174
174
  return this.structures = loadedStructures
175
175
  }
176
- decode(source, end) {
177
- return this.unpack(source, end)
176
+ decode(source, options) {
177
+ return this.unpack(source, options)
178
178
  }
179
179
  };
180
180
  function checkedRead(options) {
@@ -1226,6 +1226,7 @@
1226
1226
  } else
1227
1227
  position = (position + 7) & 0x7ffffff8; // Word align to make any future copying of this buffer faster
1228
1228
  start = position;
1229
+ if (encodeOptions & RESERVE_START_SPACE) position += (encodeOptions & 0xff);
1229
1230
  referenceMap = packr.structuredClone ? new Map() : null;
1230
1231
  if (packr.bundleStrings && typeof value !== 'string') {
1231
1232
  bundledStrings = [];
@@ -2191,6 +2192,7 @@
2191
2192
  defaultPackr.pack;
2192
2193
  const REUSE_BUFFER_MODE = 512;
2193
2194
  const RESET_BUFFER_MODE = 1024;
2195
+ const RESERVE_START_SPACE = 2048;
2194
2196
 
2195
2197
  const ASCII = 3; // the MIBenum from https://www.iana.org/assignments/character-sets/character-sets.xhtml (and other character encodings could be referenced by MIBenum)
2196
2198
  const NUMBER = 0;