diff --git a/docs/src/UserGuide/write.md b/docs/src/UserGuide/write.md index 3d047041..78fb2b91 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, number between 0 (no compression) and 9 (max compression) +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, number between 0 (no compression) and 9 (max compression) +savedataset(ds, path="ds.nc", driver=:netcdf, 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