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

Use consistent terminology to refer to a section in CAR file #302

Open
masih opened this issue May 3, 2022 · 3 comments
Open

Use consistent terminology to refer to a section in CAR file #302

masih opened this issue May 3, 2022 · 3 comments
Labels
P3 Low: Not priority right now

Comments

@masih
Copy link
Member

masih commented May 3, 2022

The term "Section" is used to describe the repeated <varint><cid><block> format that collectively make up the Data portion of a CAR file.

Use terminology consistent with docs in code to avoid confusion.
Example inconsistent terminology, where the term "block" is used to refer to a "Section":

func (b *ReadOnly) readBlock(idx int64) (cid.Cid, []byte, error) {
bcid, data, err := util.ReadNode(internalio.NewOffsetReadSeeker(b.backing, idx), b.opts.ZeroLengthSectionAsEOF)
return bcid, data, err
}

@ribasushi
Copy link

I'd recommend using frame. Section is too broad / will conflict with the concept of synthetic cars in the future ( car files that are copy-pasted one after the other with all headers removed )

@masih
Copy link
Member Author

masih commented May 3, 2022

Frame is good too; really, consistent terminology is the main thing for me :)

@rvagg rvagg added the P3 Low: Not priority right now label May 3, 2022
@rvagg
Copy link
Member

rvagg commented May 3, 2022

I'm fine with "Frame" but it's going to require spec updating - someone needs to do that and you're welcome to (and I'd +1), but if that doesn't get done then "Section" is what we have.

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

3 participants