@hpcc-js/wasm-base91 1.13.4 → 1.13.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hpcc-js/wasm-base91",
3
- "version": "1.13.4",
3
+ "version": "1.13.6",
4
4
  "description": "hpcc-js - WASM Base91",
5
5
  "type": "module",
6
6
  "exports": {
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "dependencies": {},
41
41
  "devDependencies": {
42
- "@hpcc-js/esbuild-plugins": "1.8.7",
42
+ "@hpcc-js/esbuild-plugins": "1.8.9",
43
43
  "@hpcc-js/wasm-util": "1.0.0"
44
44
  },
45
45
  "keywords": [
@@ -57,5 +57,5 @@
57
57
  },
58
58
  "homepage": "https://hpcc-systems.github.io/hpcc-js-wasm/",
59
59
  "license": "Apache-2.0",
60
- "gitHead": "306fa388d0c12ee11ec4a77da0b1b4a0f4e192ca"
60
+ "gitHead": "0a1046b66f0bf4efd00ea0ed088429129c42ccfb"
61
61
  }
package/src/base91.ts CHANGED
@@ -135,9 +135,12 @@ export class Base91 {
135
135
  const unencoded = this._mainModule.malloc(encoded.size);
136
136
 
137
137
  unencoded.size = this._base91.decode(encoded.ptr, encoded.size, unencoded.ptr);
138
- let retVal = this._mainModule.heapView(unencoded);
138
+ const mainVal = this._mainModule.heapToUint8Array(unencoded);
139
139
  unencoded.size = this._base91.decode_end(unencoded.ptr);
140
- retVal = new Uint8Array([...retVal, ...this._mainModule.heapView(unencoded)]);
140
+ const endVal = this._mainModule.heapToUint8Array(unencoded);
141
+ const retVal = new Uint8Array(mainVal.length + endVal.length);
142
+ retVal.set(mainVal);
143
+ retVal.set(endVal, mainVal.length);
141
144
 
142
145
  this._mainModule.free(unencoded);
143
146
  this._mainModule.free(encoded);