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

look at adding the option to directly parse a binary. #4

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

idyll
Copy link

@idyll idyll commented May 28, 2024

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.

@idyll
Copy link
Author

idyll commented May 28, 2024

I've got things working for files that aren't actually zips. I need to look at them next.

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