@@ -355,24 +355,25 @@ Here is an example storing an array directly into a Zip file via the
355
355
>>> import zict
356
356
>>> import os
357
357
>>> store = zict.Zip('example.zip', mode='w')
358
- >>> z = zarr.zeros((1000, 1000), chunks=(100, 100), dtype='i4', store=store)
358
+ >>> z = zarr.zeros((1000, 1000), chunks=(100, 100), dtype='i4',
359
+ ... compression='zlib', compression_opts=1, store=store)
359
360
>>> z
360
361
zarr.core.Array((1000, 1000), int32, chunks=(100, 100), order=C)
361
- compression: blosc ; compression_opts: {'clevel': 5, 'cname': 'blosclz', 'shuffle': 1}
362
+ compression: zlib ; compression_opts: 1
362
363
nbytes: 3.8M; initialized: 0/100
363
364
store: zict.zip.Zip
364
365
>>> z[:] = 42
365
366
>>> store.flush() # only required for zict.Zip
366
367
>>> os.path.getsize('example.zip')
367
- 34805
368
+ 30828
368
369
369
370
Re-open and check that data have been written::
370
371
371
372
>>> store = zict.Zip('example.zip', mode='r')
372
373
>>> z = zarr.Array(store)
373
374
>>> z
374
375
zarr.core.Array((1000, 1000), int32, chunks=(100, 100), order=C)
375
- compression: blosc ; compression_opts: {'clevel': 5, 'cname': 'blosclz', 'shuffle': 1}
376
+ compression: zlib ; compression_opts: 1
376
377
nbytes: 3.8M; initialized: 100/100
377
378
store: zict.zip.Zip
378
379
>>> z[:]
0 commit comments