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

PrivateFile::stream_content doesn't honor the index for inline content #361

Open
fabricedesre opened this issue Oct 18, 2023 · 1 comment

Comments

@fabricedesre
Copy link
Collaborator

PrivateFile::stream_content() takes an index parameter that is passed to the private forest content when the file content is external. However in the case of inline content, the whole vector is yieled in

yield data.clone()

I think we should instead yield data[index..].to_vec()

@matheus23
Copy link
Member

Sorry. The index actually refers to the block index, not the byte index. We should fix the docs and provide an abstraction on top that does the conversation between block and byte indices.

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

2 participants