File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
webknossos-datastore/app/com/scalableminds/webknossos/datastore/datareaders/n5 Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change
1
+ ### Added
2
+ - Added Zstandard support for N5
Original file line number Diff line number Diff line change @@ -8,7 +8,9 @@ import com.scalableminds.webknossos.datastore.datareaders.{
8
8
GzipCompressor ,
9
9
NullCompressor ,
10
10
StringCompressionSetting ,
11
- ZlibCompressor
11
+ ZlibCompressor ,
12
+ ZstdCompressor ,
13
+ IntCompressionSetting ,
12
14
}
13
15
14
16
object N5CompressorFactory {
@@ -28,6 +30,13 @@ object N5CompressorFactory {
28
30
new ZlibCompressor (properties)
29
31
case " gzip" => new GzipCompressor (properties)
30
32
case " blosc" => new BloscCompressor (properties)
33
+ case " zstd" => {
34
+ val level = properties.get(" level" ) match {
35
+ case Some (IntCompressionSetting (l)) => l
36
+ case _ => throw new IllegalArgumentException (" Zstd level must be int" )
37
+ }
38
+ new ZstdCompressor (level, checksum = false )
39
+ }
31
40
case _ => throw new IllegalArgumentException (" Compressor id:'" + id + " ' not supported." )
32
41
}
33
42
}
You can’t perform that action at this time.
0 commit comments