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.
Implements chunk transfer encoding. This was already enabled through the
Filesystem.read()
method, so this mostly involved improving the efficiency of tag reading. I did have to remove parallel tag reading (#92) since the tags are not aware of each other and would send the same 16kb request multiple times, but overall this makes things faster.To make things simpler for now, we coerce the chunk size to be at least the minimum size required to accomplish the operation that initiated the request (ex. chunk size is 10k but reading a tag value requires 15k bytes). This also makes it possible to test the differences between chunk sizes, as setting a chunk size of 0 will essentially disable chunking for all header requests. This could be an issue on larger images with really big offset tags, but aiocogeo doesn't support BigTiff yet anyways!
Closes #76
TODOs:
INGESTED_BYTES_AT_OPEN
and the chunk size used to request data beyond the initial request. And make them both configurable.