From f1396432f96f07658f6248cdb1675955044629e1 Mon Sep 17 00:00:00 2001 From: Philippe Roy Date: Fri, 13 Sep 2024 12:59:50 -0400 Subject: [PATCH] Update write.md --- docs/src/UserGuide/write.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/src/UserGuide/write.md b/docs/src/UserGuide/write.md index 3d047041..a043e6e1 100644 --- a/docs/src/UserGuide/write.md +++ b/docs/src/UserGuide/write.md @@ -28,6 +28,17 @@ savedataset(ds, path="ds.zarr", driver=:zarr) nothing # hide ```` +Save a dataset to Zarr format with compression: + +````@example write +using Blosc +n = 7 # compression level +compression = Zarr.BloscCompressor(clevel=n) + +savedataset(ds, path="ds.zarr", driver=:zarr, compressor=compression) +nothing # hide +```` + ## Write NetCDF Save a single YAXArray to a directory: @@ -45,6 +56,14 @@ savedataset(ds, path="ds.nc", driver=:netcdf) nothing # hide ```` +Save a dataset to NetCDF format with compression: + +````@example write +n = 7 # compression level +savedataset(ds, path="ds.zarr", driver=:zarr, compress=n) +nothing # hide +```` + ## Overwrite a Dataset If a path already exists, an error will be thrown. Set `overwrite=true` to delete the existing dataset