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

Calculating Chunk Bounds #371

Open
xloem opened this issue May 27, 2022 · 0 comments
Open

Calculating Chunk Bounds #371

xloem opened this issue May 27, 2022 · 0 comments

Comments

@xloem
Copy link

xloem commented May 27, 2022

Hi,

Is there documentation somewhere, or could somebody answer, how to calculate the bounds of a chunk around a non-aligned absolute data offset?

I'm trying to put together code to extract dataitems from ans104 bundles and other larger transactions, without downloading the entire data, knowing only an offset into the data.

What I have right now works, but it basically pings /chunk2/ repeatedly up until the offset, closing the connection after the 3
bytes of length are transferred. It's pretty slow. I understand most of the blocks are aligned to 256KiB, but that there are a handful of situations where this is not true, especially in very old transactions. What is the whole situation, including old transactions?

EDIT:
I've discerned this much: The offset of a tx, minus its size, plus 1, is the start of a chunk, and all chunks are 256KiB.

JamesPiechota pushed a commit that referenced this issue Mar 1, 2024
Log solutions and partial solutions in [info]
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

No branches or pull requests

1 participant