Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support replacing Roots in CAR file as long as they fit within padding + existing header size #252

Open
masih opened this issue Oct 1, 2021 · 0 comments
Labels
P3 Low: Not priority right now

Comments

@masih
Copy link
Member

masih commented Oct 1, 2021

go-car/v2 offers an API to replace root CIDs in the inner CARv1 as long as the replacement does not change the size of inner CARv1 header. This is to provide a cheap way to swap root CIDs without having to shift the inner CARv1 sections since they can be quite large.

CARv2 supports optional padding before the data payload. That function can accept replacement roots of different size as long as they fit within the Toal size of padding + current inner CARv1 header.

For example, if the replacements are smaller than existing it would expand the padding. Similarly, when the replacements are larger it would take off the padding needed to fit the new inner CARv1 header. It would then update the CARv2 header with a corrected data offset.

Relates to:

@BigLep BigLep added the P3 Low: Not priority right now label May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Low: Not priority right now
Projects
None yet
Development

No branches or pull requests

2 participants