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.
@@ -170,8 +170,8 @@
170
170
  }
171
171
  return this.structures = loadedStructures
172
172
  }
173
- decode(source, end) {
174
- return this.unpack(source, end)
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