google / neuroglancer

WebGL-based viewer for volumetric data
Apache License 2.0
1.09k stars 299 forks source link

fix(zstd): Upgrade numcodecs.js to 0.3.2 for Zstd streaming decompression #639

Closed mkitti closed 1 month ago

mkitti commented 3 months ago

Fix #625

Upgrade numcodecs.js to version 0.3.2

Version 0.3.2 incorporates https://github.com/manzt/numcodecs.js/pull/47 which supports detection of ZSTD_CONTENTSIZE_UNKNOWN from ZSTD_getFrameContentSize.

Zstd decompression is now handled via the advanced streaming API so that the entire buffer size does not need to be known ahead of time.

Incorporating this allows Neuroglancer to read Zstd compressed data from Tensorstore. However, this not resolve https://github.com/google/tensorstore/issues/182 . Other Zarr implementations such as zarr-python continue to have issues: https://github.com/zarr-developers/zarr-python/issues/2056

google-cla[bot] commented 3 months ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

mkitti commented 1 month ago

@jbms any thoughts about bumping the numcodecs.js version here?

In particular, l would like to have Zstandard streaming decompression available in Neuroglancer: https://github.com/manzt/numcodecs.js/pull/47

This would allow Neuroglancer to read Tensorstore datasets that use Zstandard compression. It currently cannot because the decompressed size is not encoded in the Zstandard frame header(s).

jbms commented 1 month ago

Thanks