Skip to content

Commit 1cb1cce

Browse files
abishop1990Cipherd-v-b
authored
docs: add example of creating uncompressed arrays (#3464) (#3752)
Add a clear, simple example in the Compression section of the user guide showing how to create an array without compression by setting compressors=None. This addresses user confusion about the default compression behavior and provides an easy-to-copy example for the common use case of disabling compression entirely. Closes #3464 Co-authored-by: Cipher <cipher@openclaw.ai> Co-authored-by: Davis Bennett <davis.v.bennett@gmail.com>
1 parent a89b927 commit 1cb1cce

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

changes/3464.doc.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add documentation example for creating uncompressed arrays in the Compression section of the user guide.

docs/user-guide/arrays.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,13 @@ print(z.info_complete())
224224
If you don't specify a compressor, by default Zarr uses the Zstandard
225225
compressor.
226226

227+
To create an array without any compression, set `compressors=None`:
228+
229+
```python exec="true" session="arrays" source="above" result="ansi"
230+
z_no_compress = zarr.create_array(store='data/example-uncompressed.zarr', shape=(10000, 10000), chunks=(1000, 1000), dtype='int32', compressors=None)
231+
print(f"Compressors: {z_no_compress.compressors}")
232+
```
233+
227234
In addition to Blosc and Zstandard, other compression libraries can also be used. For example,
228235
here is an array using Gzip compression, level 1:
229236

0 commit comments

Comments
 (0)