@@ -119,30 +119,33 @@ public void testV3Codecs() throws IOException, ZarrException {
119119 Array readArray = Array .open (
120120 new FilesystemStore (TESTDATA ).resolve ("l4_sample" , "color" , "8-8-2" ));
121121 ucar .ma2 .Array readArrayContent = readArray .read ();
122-
123- Array gzipArray = Array .create (
124- new FilesystemStore (TESTOUTPUT ).resolve ("l4_sample_gzip" , "color" , "8-8-2" ),
125- Array .metadataBuilder (readArray .metadata ).withCodecs (c -> c .withGzip (5 )).build ()
126- );
127- gzipArray .write (readArrayContent );
128- ucar .ma2 .Array outGzipArray = gzipArray .read ();
129- assert MultiArrayUtils .allValuesEqual (outGzipArray , readArrayContent );
130-
131- Array bloscArray = Array .create (
132- new FilesystemStore (TESTOUTPUT ).resolve ("l4_sample_blosc" , "color" , "8-8-2" ),
133- Array .metadataBuilder (readArray .metadata ).withCodecs (c -> c .withBlosc ("zstd" , 5 )).build ()
134- );
135- bloscArray .write (readArrayContent );
136- ucar .ma2 .Array outBloscArray = gzipArray .read ();
137- assert MultiArrayUtils .allValuesEqual (outBloscArray , readArrayContent );
138-
139- Array zstdArray = Array .create (
140- new FilesystemStore (TESTOUTPUT ).resolve ("l4_sample_zstd" , "color" , "8-8-2" ),
141- Array .metadataBuilder (readArray .metadata ).withCodecs (c -> c .withZstd (10 )).build ()
142- );
143- zstdArray .write (readArrayContent );
144- ucar .ma2 .Array outZstdArray = gzipArray .read ();
145- assert MultiArrayUtils .allValuesEqual (outZstdArray , readArrayContent );
122+ {
123+ Array gzipArray = Array .create (
124+ new FilesystemStore (TESTOUTPUT ).resolve ("l4_sample_gzip" , "color" , "8-8-2" ),
125+ Array .metadataBuilder (readArray .metadata ).withCodecs (c -> c .withGzip (5 )).build ()
126+ );
127+ gzipArray .write (readArrayContent );
128+ ucar .ma2 .Array outGzipArray = gzipArray .read ();
129+ assert MultiArrayUtils .allValuesEqual (outGzipArray , readArrayContent );
130+ }
131+ {
132+ Array bloscArray = Array .create (
133+ new FilesystemStore (TESTOUTPUT ).resolve ("l4_sample_blosc" , "color" , "8-8-2" ),
134+ Array .metadataBuilder (readArray .metadata ).withCodecs (c -> c .withBlosc ("zstd" , 5 )).build ()
135+ );
136+ bloscArray .write (readArrayContent );
137+ ucar .ma2 .Array outBloscArray = bloscArray .read ();
138+ assert MultiArrayUtils .allValuesEqual (outBloscArray , readArrayContent );
139+ }
140+ {
141+ Array zstdArray = Array .create (
142+ new FilesystemStore (TESTOUTPUT ).resolve ("l4_sample_zstd" , "color" , "8-8-2" ),
143+ Array .metadataBuilder (readArray .metadata ).withCodecs (c -> c .withZstd (10 )).build ()
144+ );
145+ zstdArray .write (readArrayContent );
146+ ucar .ma2 .Array outZstdArray = zstdArray .read ();
147+ assert MultiArrayUtils .allValuesEqual (outZstdArray , readArrayContent );
148+ }
146149 }
147150
148151 @ Test
0 commit comments