look at adding the option to directly parse a binary. #4
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.
In cases where you are upload a file directly to AWS S3 (or similar) you don't always have the full content of the file.
Using a
range: bytes=0-4095
header you can pull the first 4096 bytes of the file (as an example).In this case, we must currently save the bytes to a file because of the usage of
file.pread
in several places in this package.This is intended to supplement that and allow the checks to work directly on the binary data in memory.
IT SHOULD BE NOTED that this is going to fail in some cases, because we need more of the file to determine its contents. But that's okay. Then you could just pull the whole file.