-
Notifications
You must be signed in to change notification settings - Fork 17
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
add subset, offset and size index #146
Conversation
import "errors" | ||
|
||
type SubsetOffsetAndSize struct { | ||
Subset uint64 // uint24, 3 bytes, max 16.7 MB (megabytes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could be even smaller? uint16 ? but might not be worth it and better to have an extra byte
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I don't have a strong opinion here. @gagliardetto ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah uint16 should be eough
cmd-x-index-cid2subsetoffset.go
Outdated
var network indexes.Network | ||
var indexDir string | ||
return &cli.Command{ | ||
Name: "cid-to-offset", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this probably needs a different name
given that we have the metadata that states the byte beginning and end of split piece, we can avoid creating this new index and just use the existing there will be an extra step that will calculate the subset file from an offset. |
Do we have this @gagliardetto ? |
Ohhh you are saying we should add it -- #132 (comment) |
I suspect we are not going to need this after merging #132 Basically the existing indexes will "just work" |
No description provided.