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

Return only bytes that have been read #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

snormore
Copy link

Read currently returns a fixed size array with 0s for bytes outside of those that have been read, which makes it difficult to reliably write logic around this that reads all expected data over time without using 0s as an indicator for it. This PR updates Read to truncate the returned array to only include the bytes that have been read.

This would be a breaking change in terms of expectations of existing users, so I'm not sure if you want to merge it, but opening it in case you do.

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

Successfully merging this pull request may close these issues.

1 participant