Merge branch 'feat/p3-in-place-modify' into feat/p3-range-zfp-edit

# Conflicts:
#	CHANGELOG.md
#	crates/clawhdf5-py/src/lib.rs
#	crates/clawhdf5/src/error.rs
This commit is contained in:
osobh
2026-09-26 14:52:55 -05:00
21 changed files with 5919 additions and 19 deletions
+17
View File
@@ -433,6 +433,23 @@ b.write("groups.h5")?;
A group holds at most 65 535 links; more is an error, as is a link over
65 515 bytes (a very long soft-link target) in a group of more than 8 links.
### Modifying an existing file
```rust
use clawhdf5::{AttrValue, FileEditor, Selection};
// A file from h5py or clawhdf5, dataset "x" chunked with maxshape=(None,).
let mut ed = FileEditor::open("data.h5")?; // exclusive lock, like libhdf5
ed.resize("x", &[1100])?; // h5py: ds.resize((1100,))
let sel = Selection::Hyperslab { start: vec![1000], stride: vec![1], count: vec![100], block: vec![1] };
ed.write_values("x", &sel, &[0.5f64; 100])?; // ds[1000:1100] = 0.5
ed.set_attr("x", "units", &AttrValue::String("m/s".into()))?;
```
Each call changes the file in place (no rewrite) and syncs it. What it
cannot change safely is refused before anything is written; see
[known issues](docs/known-issues.md) for the limits.
### Python
`crates/clawhdf5-py` is a Python package (PyO3 + numpy) that reads HDF5 with