-
-
Notifications
You must be signed in to change notification settings - Fork 9
[FEATURE] Read files content lazily #14
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50090ca
to
8b97630
Compare
3cdc06e
to
b8b88e1
Compare
149705a
to
687c368
Compare
407e63e
to
4470b8a
Compare
joelanford
reviewed
Aug 3, 2023
use the offset to avoid iterating tar file when opening each file. Signed-off-by: Joe Lanford <joe.lanford@gmail.com>
after we've read the non-readerAt reader into a buffer, we now have a readerAt either way, which simplifies code and no longer requires separate buffers per file entry. Signed-off-by: Joe Lanford <joe.lanford@gmail.com>
Reading file content straight from the underlying reader was too straightforward. Instead read from a new tar.Reader with an underlying reader pointing straight to the tar entry we want to read.
Should improve initial read of the tar file.
30ec627
to
2aa91f4
Compare
joelanford
reviewed
Aug 11, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
tar.Reader
each time a file needs to be readio.Reader
isn't anio.ReaderAt
, fallback to reading the whole tar file in a bufferio.Seeker
overtar.Reader
to allow usage withhttp.FS