Releases: usnistgov/jsfive
v0.3.14
v0.3.13
Fixed
- handling of links when btree v2 is used but creation order is not specified
v0.3.12
Fixed
- reading of V2 Btree nodes with node_level greater than 1 (deep trees)
- handling of undefined group_order
v0.3.10
Changed
- browser (IIFE) library moved to dist/browser/hdf5.js
- ESM library moved to dist/esm/index.mjs
Added
- CJS library added at dist/cjs/index.js
v0.3.9
Changed
- Strings are all decoded with TextDecoder
Added
- Minimal support for ENUMERATED datatype, using base type to read
Adding separate filters module
Changed
The filter pipeline is refactored to use a separate module (filters.js) from which a Filters map is exported. Users wanting to add their own filter implementation can do so by:
import * as hdf5 from "jsfive";
const filter_id = 12345; // filter identifier
const filter_fn(buf, itemsize, filter_params) {
// do filter stuff here, return ArrayBuffer
}
hdf5.Filters.set(filter_id, filter_fn);
// then use as normal
var f = new hdf5.File(arrayBuffer, "my_file"); // ...
where the user filter function takes a single chunk
of data as an ArrayBuffer and returns a processed ArrayBuffer. The itemsize parameter is for a single item of the datatype. The signature is:
type FilterFn = {
(buf: ArrayBuffer, itemsize: number, filter_params: number[]): ArrayBuffer;
};
Remove dist artifacts
Changed
- browser library built as IIFE
- module compiled as ESM
- no special import required for
create-react-app
, just useimport * as hdf5 from 'jsfive';
Removed
- all dist artifacts from git tracking - they will be attached as .tgz to release instead
Switch build from parcel2 to esbuild
- Build process has been adjusted to use esbuild instead of parcel2, targeting es2020 for web
- using pako instead of pako-es (there is now an ESM module available directly from pako)
- removing the now-unused web_modules directory
Fix message lookup and support create-react-app
A bug was introduced when adding the BTree-V2 objects parsing: messages are read and stored with offsets relative to the global file buffer (unlike in pyfive) but the message-parsing functions were using addresses relative to the start of the message block (which is not collated in jsfive), and has been fixed.
Support for create-react-app
has been added by pre-compiling the libraries with transforms for the class fields/properties. To use jsfive in this context you can npm i jsfive
and then in App.js use
import * as hdf5 from 'jsfive/dist/index.js';
fix reading link info msgs
Bug fix for files that have link_info_msgs and links are stored compactly (triggered a bug where checking for undefined address was done twice and failed the second time)