Skip to content

tarfs: reference package file contents by digest - #2593

Closed
kevinmdavis wants to merge 1 commit into
chainguard-dev:mainfrom
kevinmdavis:tarfs-cas
Closed

kevinmdavis wants to merge 1 commit into
chainguard-dev:mainfrom
kevinmdavis:tarfs-cas

Conversation

@kevinmdavis

Copy link
Copy Markdown
Member

Record SHA-256 content digests while indexing expanded APKs and use them to reference package file contents from tarfs. This separates the tree from archive paths so more metadata-only operations can work without reading unmodified package data.

Preserve the existing PackageContents and WriteHeaderer contracts, including calls through filesystem wrappers. Sources without digest support retain lazy reads by name and APK checksum comparisons, while digest-aware sources use the content store.

Share mutable buffers across file handles and cover both backing paths with regression tests. Validate incomplete entries before changing the tree and reuse the archive hashing buffer to avoid per-entry allocations.

Record SHA-256 content digests while indexing expanded APKs and use them to reference package file contents from tarfs. This separates the tree from archive paths so more metadata-only operations can work without reading unmodified package data.

Preserve the existing PackageContents and WriteHeaderer contracts, including calls through filesystem wrappers. Sources without digest support retain lazy reads by name and APK checksum comparisons, while digest-aware sources use the content store.

Share mutable buffers across file handles and cover both backing paths with regression tests. Validate incomplete entries before changing the tree and reuse the archive hashing buffer to avoid per-entry allocations.
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