Releases: usnistgov/h5wasm
Releases · usnistgov/h5wasm
v0.4.11
v0.4.11 2023-04-19
Fixed
- all datasets and attributes are read out in little-endian order (closes #49)
Added
- New method to overwrite slice of an existing dataset:
Dataset.write_slice(ranges: Array<Array<number>>, data: any): void;
- Method to delete an attribute from a dataset or group (can be used to update an attribute by deleting it then re-creating it)
Dataset.delete_attribute(name: str): number
(returns non-zero value if it fails for some reason)Group.delete_attribute(name: str): number
- Ability to specify chunks and maxshape when creating dataset (to make a resizable dataset):
Group.create_dataset(name: string, data: GuessableDataTypes, shape?: number[] | null, dtype?: string | null, maxshape?: (number | null)[] | null, chunks?: number[] | null): Dataset
- New method to resize datasets (only works if chunks and maxshape were defined):
Dataset.resize(new_shape: number[]): void
Changed
- Metadata now includes
chunks: Array<number> | null,
information andmaxshape: Array<number> | null
v0.4.10
v0.4.10 2023-02-19
Added
- Group.paths(): string[]; // returns a list of all link paths found below the group in the tree. (Use on root object to get all paths in the file)
v0.4.9
v0.4.9 2022-12-21
Added
- Group.create_soft_link(target: string, name: string): number; // creates a soft link in a group with name: name (target must be absolute path)
- Group.create_hard_link(target:string, name: string): number; //
- Group.create_external_link(file_name: string, target: string, name: string): number;
All of these return non-zero values on error. To create links with absolute path, just use e.g. File.create_soft_link(target_path, link_path);
v0.4.8
v0.4.8 2022-12-05
Added
- IIFE build at
./dist/iife/h5wasm.js
, to support use in Firefox workers (which don't currently support ESM) - WORKERFS support in ESM/IIFE builds, for loading local files with random access instead of copying whole file into memory
v0.4.7
v0.4.6
v0.4.6 2022-08-04
Changed
- removed
Dataset.auto_refresh
and replaced with.refresh()
method (allows consistent access to metadata and data between refreshes)
v0.4.5
v0.4.5 2022-08-04
Fixed
- H5Create should only be called with access modes H5F_ACC_TRUNC (w) and H5F_ACC_EXCL (x)
Added
- support for SWMR read with refresh on a dataset: e.g.
const file = new hdf5.File("swmr.h5", "Sr");
let ds=file.get("data");
ds.auto_refresh=true;
ds.shape;
// returns 12
ds.shape;
// returns 16 because dataset was updated with SWMR write
ds.value
// has size=16
v0.4.4
v0.4.4 2022-05-25
Fixed
- error in
isIterable
when called on non-object (affectsto_array
method)
v0.4.3
v0.4.3 2022-05-24
Added
to_array
method on Dataset and Attribute classes: returns nested array of values with dimensions matchingshape
. Auto-converts all values to JSON-compatible types (BigInt -> Number, TypedArray -> Array)- auto-convert h5py-style boolean datasets (where datatype = ENUM {FALSE:0, TRUE:1}) to JS booleans
- automated testing of code with Github Action
Fixed
- enum_type.members is now an object {[name: string]: value: number}
(previous implementation with Array could have wrong name order)
v0.4.2
v0.4.2 2022-05-10
Added
- extended metadata for ENUM type (including names of members)
Fixed
- Typings for metadata on attributes and datasets