From 2400daf77971ebeb843ea462e88c3bd326ad74a5 Mon Sep 17 00:00:00 2001 From: Alan Liddell Date: Thu, 21 Sep 2023 15:13:22 -0400 Subject: [PATCH] Rename Zarr::compression_params_ to Zarr::blosc_compression_params_. --- src/zarr.cpp | 2 +- src/zarr.hh | 2 +- src/zarr.v2.cpp | 8 ++++---- src/zarr.v3.cpp | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/zarr.cpp b/src/zarr.cpp index f8efff9c..7a669363 100644 --- a/src/zarr.cpp +++ b/src/zarr.cpp @@ -530,7 +530,7 @@ zarr::Zarr::reserve_image_shape(const ImageShape* shape) zarr::Zarr::Zarr(BloscCompressionParams&& compression_params) { - compression_params_ = std::move(compression_params); + blosc_compression_params_ = std::move(compression_params); } void diff --git a/src/zarr.hh b/src/zarr.hh index 1a67ae3a..7e0932d0 100644 --- a/src/zarr.hh +++ b/src/zarr.hh @@ -61,7 +61,7 @@ struct Zarr : StorageInterface StoragePropertyMetadata::storage_property_metadata_chunking_s; /// static - set on construction - std::optional compression_params_; + std::optional blosc_compression_params_; /// changes on set fs::path dataset_root_; diff --git a/src/zarr.v2.cpp b/src/zarr.v2.cpp index 100b5383..27be80d8 100644 --- a/src/zarr.v2.cpp +++ b/src/zarr.v2.cpp @@ -57,14 +57,14 @@ zarr::ZarrV2::allocate_writers_() const auto& tile_shape = image_tile_shapes_.at(i).second; uint64_t bytes_per_tile = common::bytes_per_tile(tile_shape, pixel_type_); - if (compression_params_.has_value()) { + if (blosc_compression_params_.has_value()) { writers_.push_back(std::make_shared( image_shape, tile_shape, (uint32_t)(max_bytes_per_chunk_ / bytes_per_tile), (get_data_directory_() / std::to_string(i)).string(), this, - compression_params_.value())); + blosc_compression_params_.value())); } else { writers_.push_back(std::make_shared( image_shape, @@ -120,8 +120,8 @@ zarr::ZarrV2::write_array_metadata_(size_t level) const { "dimension_separator", "/" }, }; - if (compression_params_.has_value()) { - zarray_attrs["compressor"] = compression_params_.value(); + if (blosc_compression_params_.has_value()) { + zarray_attrs["compressor"] = blosc_compression_params_.value(); } else { zarray_attrs["compressor"] = nullptr; } diff --git a/src/zarr.v3.cpp b/src/zarr.v3.cpp index a76f28e2..3074cba4 100644 --- a/src/zarr.v3.cpp +++ b/src/zarr.v3.cpp @@ -100,7 +100,7 @@ zarr::ZarrV3::allocate_writers_() uint64_t bytes_per_tile = common::bytes_per_tile(tile_dims, pixel_type_); writers_.clear(); - if (compression_params_.has_value()) { + if (blosc_compression_params_.has_value()) { writers_.push_back(std::make_shared( frame_dims, shard_dims_, @@ -108,7 +108,7 @@ zarr::ZarrV3::allocate_writers_() (uint32_t)(max_bytes_per_chunk_ / bytes_per_tile), (get_data_directory_() / "0").string(), this, - compression_params_.value())); + blosc_compression_params_.value())); } else { writers_.push_back(std::make_shared( frame_dims, @@ -184,8 +184,8 @@ zarr::ZarrV3::write_array_metadata_(size_t level) const image_dims.cols, // x }); - if (compression_params_.has_value()) { - auto params = compression_params_.value(); + if (blosc_compression_params_.has_value()) { + auto params = blosc_compression_params_.value(); metadata["compressor"] = json::object({ { "codec", "https://purl.org/zarr/spec/codec/blosc/1.0" }, { "configuration",