Skip to content

Commit

Permalink
Remove compression from array_write_read example
Browse files Browse the repository at this point in the history
  • Loading branch information
LDeakin committed Oct 4, 2023
1 parent f344df7 commit 8f4fcbc
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 12 deletions.
11 changes: 5 additions & 6 deletions examples/array_write_read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ fn array_write_read() -> Result<(), Box<dyn std::error::Error>> {
use rayon::prelude::{IntoParallelIterator, ParallelIterator};
use std::sync::Arc;
use zarrs::{
array::FillValue,
array::{chunk_grid::ChunkGridTraits, DataType},
array::{codec, FillValue},
array_subset::ArraySubset,
node::Node,
storage::store,
Expand All @@ -13,7 +13,9 @@ fn array_write_read() -> Result<(), Box<dyn std::error::Error>> {
// Create a store
// let path = tempfile::TempDir::new()?;
// let store = Arc::new(store::FilesystemStore::new(path.path())?);
// let store = Arc::new(store::FilesystemStore::new("tests/data/array_write_read.zarr")?);
// let store = Arc::new(store::FilesystemStore::new(
// "tests/data/array_write_read.zarr",
// )?);
let store = Arc::new(store::MemoryStore::default());

// Create a group and write metadata to filesystem
Expand Down Expand Up @@ -41,10 +43,7 @@ fn array_write_read() -> Result<(), Box<dyn std::error::Error>> {
vec![4, 4].into(), // regular chunk shape
FillValue::from(f32::NAN),
)
.bytes_to_bytes_codecs(vec![
#[cfg(feature = "gzip")]
Box::new(codec::GzipCodec::new(5)?),
])
// .bytes_to_bytes_codecs(vec![]) // uncompressed
.dimension_names(vec!["y".into(), "x".into()])
.storage_transformers(vec![])
.build(store.clone(), array_path)?;
Expand Down
Binary file modified tests/data/array_write_read.zarr/group/array/c/0/0
Binary file not shown.
Binary file modified tests/data/array_write_read.zarr/group/array/c/0/1
Binary file not shown.
Binary file modified tests/data/array_write_read.zarr/group/array/c/1/0
Binary file not shown.
Binary file modified tests/data/array_write_read.zarr/group/array/c/1/1
Binary file not shown.
6 changes: 0 additions & 6 deletions tests/data/array_write_read.zarr/group/array/zarr.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@
"configuration": {
"endian": "little"
}
},
{
"name": "gzip",
"configuration": {
"level": 5
}
}
],
"dimension_names": [
Expand Down

0 comments on commit 8f4fcbc

Please sign in to comment.