Skip to content

refactor(data)!: implement IndexedTarStore independently of zarr-python - #193

Closed
janickm wants to merge 1 commit into
NVIDIA:mainfrom
janickm:dev/janickm/itar-independent-of-zarr
Closed

janickm wants to merge 1 commit into
NVIDIA:mainfrom
janickm:dev/janickm/itar-independent-of-zarr

Conversation

@janickm

@janickm janickm commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Implements the record storage of indexed tar archives (ncore/impl/data/_itar.py) independently of zarr-python, in preparation of supporting multiple zarr-python versions. Factored out of #68.

  • IndexedTarStore provides raw access to the records of an archive (mapping interface), stores.ZarrIndexedTarStore adapts it to zarr-python's store interface
  • Local archives are read via positional reads (os.pread), which don't serialize reads of multiple threads, and close their file descriptors also when stores are dropped without closing them
  • Records starting within the index tail read are served from memory (no additional reads)
  • The CBOR + LZMA encoding of the record index and of the compressed consolidated metadata is shared

Archives are byte-identical to archives written by ncore 19.8 (tested via the sha256 of a fixed hierarchy written by ncore 19.8).

Breaking change

IndexedTarStore is no longer a zarr-python store. Wrap it via stores.ZarrIndexedTarStore (or stores.zarr_store) to access the zarr hierarchies of archives with zarr-python directly.

Separate the record storage of indexed tar archives (_itar.py) from
zarr-python, in preparation of supporting multiple zarr-python versions:

- IndexedTarStore provides raw access to the records of an archive
  (mapping interface), ZarrIndexedTarStore adapts it to zarr-python's
  store interface (stores.ZarrIndexedTarStore / stores.zarr_store)
- Read local archives via positional reads (os.pread), which don't
  serialize reads of multiple threads, and close their file descriptors
  also when stores are dropped without closing them
- Serve records starting within the index tail read from memory
- Share the CBOR + LZMA document encoding of the record index and the
  compressed consolidated metadata

Archives are byte-identical to archives written by ncore 19.8 (tested
via the sha256 of a fixed hierarchy written by ncore 19.8).

BREAKING CHANGE: IndexedTarStore is no longer a zarr-python store, wrap
it via stores.ZarrIndexedTarStore (or stores.zarr_store) to access zarr
hierarchies of archives directly with zarr-python.
@janickm

janickm commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator Author

Opened by mistake, this commit stays in #68.

@janickm janickm closed this Oct 13, 2026
@janickm
janickm deleted the dev/janickm/itar-independent-of-zarr branch October 14, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant