All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
N5NdarrayReader::read_ndarray_into(_with_buffer)?
allow reading into existing ndarrays and with existing block buffers for fewer allocations.
N5NdarrayWriter::write_ndarray
performs fewer per-block allocations.
- Fixed a performance regression around path canonicalization in
N5Filesystem
.
N5Filesystem
incorrectly handled absolute data paths for many operations.
- Dataset paths can now be absolute (with a leading
/
)
N5Filesystem::list
now traverses symlinks.
- An alternative pure Rust Lz4 backend is available under the
lz_pure
feature flag. This is not the default as it does not yet match the performance of the defaultlz
feature backend.
Bzip2Compression
now respects exactblock_size
value in [1, 9] rather than just a three-tier behavior.N5Filesystem::open
andN5Filesystem::open_or_create
now accept anyAsRef<Path>
base path. This is backwards compatible with the previous&str
type.
- Fixed a panic in
N5NdarrayReader::read_ndarray
when a block's dataset- level bounds overlapped the request bounds, but its actual bounds did not. - Removed the ability to write blocks with a different datatype than the attributes' to a dataset.
- Dependency updates include fixes for upstream vulnerabilities and bugs in bzip2 and gzip compressions.
CompressionType
implementsFromStr
for default construction from plain type names.- All public types now implement
Debug
.
get_bounds
is now implemented for allSliceDataBlock
, not justVecDataBlock
.
DatasetAttributes::get_grid_extent
no longer undercalculates extents.
N5Writer::deleteBlock
to remove blocks from a dataset.DatasetAttributes::get_num_blocks
to get the total number of blocks possible in a dataset.- Data block metadata now includes the size of the block on the backend.
- Setting an attribute or attributes by key will now overwrite those attributes rather than recursively merging with them.
- Data block metadata fields are now optional, to support more platforms.
N5Reader::list
is now in a new trait,N5Lister
.N5NdarrayWriter::write_ndarray
now accepts anyndarray::AsArray
input type.
- The filesystem could corrupt attributes files when setting attributes, including the root version attributes when opening, because trailing data was not truncated.
- The filesystem would leave trailing data in blocks that were overwritten with shorter data.
DatasetAttribues
gained coordinate checking methods.
N5Reader::exists
andN5Reader::dataset_exists
returnResult
s.Version
is now asemver
type.- No longer depend on
regex
.
- The minimum supported Rust version is now 1.39.
- All coordinates are now unsigned rather than signed integers, since Java N5 has adopted this recommendation as of spec version 2.1.3.
SliceDataBlock
trait allows using slices forwrite_block
andread_block_into
.ReadableDataBlock
,ReinitDataBlock
, andWriteableDataBlock
traits and bounds have been refactored to allow writing of const slices, reinitialization without reserialization, and other features.ReflectedType
now has more bounds for thread safety.- LZ4 blocks are now written in independent mode, to more closely match the behavior of Java N5.
read_ndarray
now performs fewer allocations.
N5Reader::read_block_into
: read a block into an existingVecDataBlock
without allocating a new block.data_type_match!
: a macro to dispatch a primitive-type generic block of code based on aDataType
.ReflectedType
trait, which supercedes theTypeReflection
trait,DataBlockCreator
trait, andClone
bound on primitive types.N5NdarrayWriter
supertrait that provides awrite_ndarray
method to write ndarrays serially to blocks.
- All coordinates are now
SmallVec
typesGridCoord
andBlockCoord
. This avoids allocations for datasets with <= 6 dimensions. - ndarray reading is now in a
N5NdarrayReader
supertrait.
TypeReflection
trait.DataBlockCreator
trait.
DataType
implementsDisplay
.VecDataBlock<T>
implementsClone
and requiresT: Clone
.
- Updated the
flate2-rs
GZIP dependency to be compatible with WebAssembly.
N5Reader::block_metadata
: retrieve block metadata (currently timestamps) without reading the block.
N5Reader::get_block_uri
: implementation-specific URI strings for data blocks.DatasetAttributes::get_[block_]num_elements
: convenient access to dataset and block element counts.DatasetAttributes::coord_iter
: convenient iteration over all possible coordinates (requiresuse_ndarray
feature).
- Filesystem implementation is now behind a
filesystem
feature flag, which is default.
- Easy import prelude:
use n5::prelude::*;
- Mode flag was inverted from correct setting for default and varlength blocks.
- Dataset and container removal methods for
N5Writer
. N5Reader::read_ndarray
to read arbitrary bounding box column-majorndarray
arrays from datasets.
- Performance issues with some data types, especially writes.