@@ -127,9 +127,8 @@ public void testZstdLibrary(int clevel, boolean checksumFlag) throws IOException
127
127
assert exitCode == 0 ;
128
128
}
129
129
130
- //TODO: add crc32c
131
130
@ ParameterizedTest
132
- @ ValueSource (strings = {"blosc" , "gzip" , "zstd" , "bytes" , "transpose" , "sharding_start" , "sharding_end" })
131
+ @ ValueSource (strings = {"blosc" , "gzip" , "zstd" , "bytes" , "transpose" , "sharding_start" , "sharding_end" , "crc32c" })
133
132
public void testWriteToZarrita (String codec ) throws IOException , ZarrException , InterruptedException {
134
133
StoreHandle storeHandle = new FilesystemStore (TESTOUTPUT ).resolve ("write_to_zarrita" , codec );
135
134
ArrayMetadataBuilder builder = Array .metadataBuilder ()
@@ -161,7 +160,7 @@ public void testWriteToZarrita(String codec) throws IOException, ZarrException,
161
160
builder = builder .withCodecs (c -> c .withSharding (new int []{4 , 4 }, c1 -> c1 .withBytes ("LITTLE" ), "end" ));
162
161
break ;
163
162
case "crc32c" :
164
- //missing
163
+ builder = builder . withCodecs ( CodecBuilder :: withCrc32c );
165
164
break ;
166
165
default :
167
166
throw new IllegalArgumentException ("Invalid Codec: " + codec );
@@ -195,7 +194,7 @@ public void testWriteToZarrita(String codec) throws IOException, ZarrException,
195
194
196
195
197
196
@ ParameterizedTest
198
- @ ValueSource (strings = {"blosc" , "gzip" , "zstd" , "bytes" , "transpose" , "sharding_start" , "sharding_end" })
197
+ @ ValueSource (strings = {"blosc" , "gzip" , "zstd" , "bytes" , "transpose" , "sharding_start" , "sharding_end" , "crc32c" })
199
198
public void testCodecsWriteRead (String codec ) throws IOException , ZarrException {
200
199
int [] testData = new int [16 * 16 * 16 ];
201
200
Arrays .setAll (testData , p -> p );
@@ -231,7 +230,7 @@ public void testCodecsWriteRead(String codec) throws IOException, ZarrException
231
230
builder = builder .withCodecs (c -> c .withSharding (new int []{2 , 2 , 4 }, c1 -> c1 .withBytes ("LITTLE" ), "start" ));
232
231
break ;
233
232
case "crc32c" :
234
- //missing
233
+ builder = builder . withCodecs ( CodecBuilder :: withCrc32c );
235
234
break ;
236
235
default :
237
236
throw new IllegalArgumentException ("Invalid Codec: " + codec );
0 commit comments