-
-
Notifications
You must be signed in to change notification settings - Fork 233
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
experiment: Sparse file support #185
base: master
Are you sure you want to change the base?
Conversation
Just a few comments for now:
|
Yeah, I'm pretty aware of this, at least at my progress so far. That's why I'm labeling this PR as an experiment, I just want to see how possible it is. At least so far, it seems to work fine on Linux (with a major caveat that I'm trying to work around at the moment). I hadn't looked into |
Co-authored-by: David Peter <[email protected]>
I decided to take a stab at #89 just to see how feasible it is. In order to facilitate this, I have temporarily changed the API of
print_all
to takeInput
with a new genericBox <dyn Read>
variant as a fallback.So far, this implementation is only able to use sparseness when there is non-sparse content at the end of the file, and the rest of the file, including the start, is sparse. Otherwise, it will cause strange errors.
It also only works for Linux, because this was the simplest OS to implement sparse support for.
How to test this:
The position will be slightly wrong but it will finish extremely quickly.
Tasks:
BufReader
)