saalfeldlab / n5

Not HDF5
BSD 2-Clause "Simplified" License
158 stars 22 forks source link

toward storage of arbitrary data types #93

Open bogovicj opened 1 year ago

bogovicj commented 1 year ago

@minnerbe helped with this issue.

N5 core does not support non-native and non-numeric types well (i.e. all DataBlock implementations are native + numeric). E.g. the API can not currently implement / wrap HDF5's string io (see https://github.com/saalfeldlab/n5-hdf5/issues/22)

related

For string support @minnerbe implemented https://github.com/minnerbe/n5/tree/feature/vlstring-io

zarr

Zarr has support for writing object arrays, and does so via codecs in numcodecs. Existing options are JSON, MsgPack, Pickle

proposal

1) Include a generic Object DataBlock in n5

minnerbe commented 1 year ago

Thanks for bringing this up! I would add to point 1 of the proposal that this seems quite similar to the Object data type that is already implemented. However, Objects

It's probably worth considering to merge these two concepts and provide a codec that just uses native Java serialization.

bogovicj commented 1 year ago

see also https://github.com/saalfeldlab/n5/issues/87