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

Store arrays of byte ranges more efficiently #2

Open
eriksjolund opened this issue Jun 14, 2016 · 0 comments
Open

Store arrays of byte ranges more efficiently #2

eriksjolund opened this issue Jun 14, 2016 · 0 comments

Comments

@eriksjolund
Copy link
Owner

eriksjolund commented Jun 14, 2016

Instead of storing byte ranges like this

message FileRegion {
   required uint64 regionOffset = 1;
   required uint64 regionSize = 2;
}

message InterestingByteRanges {
    repeated FileRegion fileRegions = 1;
}

I think we could store them like

message FileRegions {
    // A start position could define the end position of the previous entry.
    //  To define the endPosition of the last entry we would have to
    // add an extra StartPosition in the end of the array.
    repeated uint64 startPositions = 1;
}

message InterestingByteRanges {
    required FileRegions fileRegions = 1;
}

That should reduce the size of the header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant