Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support reading zstd-compressed zarr2 datasets #7964

Merged
merged 3 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ import com.scalableminds.webknossos.datastore.datareaders.{
BloscCompressor,
CompressionSetting,
Compressor,
IntCompressionSetting,
NullCompressor,
StringCompressionSetting,
ZlibCompressor
ZlibCompressor,
ZstdCompressor
}

object ZarrCompressorFactory {
Expand All @@ -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.")
}
}