Skip to content

Commit

Permalink
wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
ibgreen committed Jan 30, 2024
1 parent 5684540 commit 4708de0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion modules/geotiff/test/tiff.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ test('Correct OME-XML.', async (t) => {
const tiff = await fromFile(TIFF_URL);
const {metadata} = await loadGeoTiff(tiff);
const {Name, Pixels} = metadata;
t.equal(Name, 'multi-channel.ome.tif', "Name should be 'multi-channel.ome.tif'.");
t.equal(Name, 'multi-channel.ome.tif', 'Name should be "multi-channel.ome.tif".');
// @ts-ignore
t.equal(Pixels.SizeC, 3, 'Should have three channels.');
// @ts-ignore
Expand Down
4 changes: 2 additions & 2 deletions modules/parquet/src/lib/wasm/encode-parquet-wasm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ export async function encode(
parquetBytes.byteLength + parquetBytes.byteOffset
);
} finally {
wasmTable.free();
wasmProperties.free();
// wasmTable.free();
// wasmProperties.free();
}
}

Expand Down
3 changes: 3 additions & 0 deletions modules/parquet/src/lib/wasm/load-wasm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ let initializePromise: any;

export async function loadWasm(wasmUrl?: string) {
if (!initializePromise && typeof initWasm === 'function') {
if (!wasmUrl) {
throw new Error('ParquetLoader: No wasmUrl provided');
}
// @ts-expect-error
initializePromise = initWasm(wasmUrl);
}
Expand Down
2 changes: 1 addition & 1 deletion modules/parquet/src/lib/wasm/parse-parquet-wasm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ export async function parseParquetWasm(
data: arrowTable
};
} finally {
wasmTable.free();
// wasmTable.free();
}
}

0 comments on commit 4708de0

Please sign in to comment.