diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md index 783edf308bd..79e3fa28d8a 100644 --- a/CHANGELOG.unreleased.md +++ b/CHANGELOG.unreleased.md @@ -22,6 +22,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released - The context menu entry "Focus in Segment List" expands all necessary segment groups in the segments tab to show the highlighted segment. [#7950](https://github.com/scalableminds/webknossos/pull/7950) - In the proofreading mode, you can enable/disable that only the active segment and the hovered segment are rendered. [#7654](https://github.com/scalableminds/webknossos/pull/7654) - Upgraded s3 client for improved performance when loading remote datasets. [#7936](https://github.com/scalableminds/webknossos/pull/7936) +- Added support for reading zstd-compressed zarr2 datasets [#7964](https://github.com/scalableminds/webknossos/pull/7964) ### Changed - The warning about a mismatch between the scale of a pre-computed mesh and the dataset scale's factor now also considers all supported mags of the active segmentation layer. This reduces the false posive rate regarding this warning. [#7921](https://github.com/scalableminds/webknossos/pull/7921/) diff --git a/webknossos-datastore/app/com/scalableminds/webknossos/datastore/datareaders/zarr/ZarrCompressorFactory.scala b/webknossos-datastore/app/com/scalableminds/webknossos/datastore/datareaders/zarr/ZarrCompressorFactory.scala index a9d2a5d9a9b..0cde8f951e6 100644 --- a/webknossos-datastore/app/com/scalableminds/webknossos/datastore/datareaders/zarr/ZarrCompressorFactory.scala +++ b/webknossos-datastore/app/com/scalableminds/webknossos/datastore/datareaders/zarr/ZarrCompressorFactory.scala @@ -4,9 +4,11 @@ import com.scalableminds.webknossos.datastore.datareaders.{ BloscCompressor, CompressionSetting, Compressor, + IntCompressionSetting, NullCompressor, StringCompressionSetting, - ZlibCompressor + ZlibCompressor, + ZstdCompressor } object ZarrCompressorFactory { @@ -23,6 +25,13 @@ object ZarrCompressorFactory { case "null" => nullCompressor case "zlib" => new ZlibCompressor(properties) case "blosc" => new BloscCompressor(properties) - case _ => throw new IllegalArgumentException("Compressor id:'" + id + "' not supported.") + case "zstd" => { + val level = properties.get("level") match { + case Some(IntCompressionSetting(l)) => l + case _ => throw new IllegalArgumentException("Zstd level must be int") + } + new ZstdCompressor(level, checksum = false) + } + case _ => throw new IllegalArgumentException("Compressor id:'" + id + "' not supported.") } }