-
Notifications
You must be signed in to change notification settings - Fork 21
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
Piping from stdin #13
Comments
In theory, assuming you're only processing one file, it's possible if recovery can be computed in one pass (i.e. all recovery data can fit within specified memory limits). If all recovery data cannot fit within memory, then multiple read passes are required, so reading data from stdin won't work. Some alternative ideas I've thought about:
Note that there's also a minor complication of needing to know the file size ahead of time, which a pure pipe cannot give, and PAR2 also requires file names, so these would need to be specified alongside the pipe. I'm considering something similar to what I do in Nyuu for piping data in. |
By "recovery data can fit within specified memory limits" you mean like I presume there could maybe be some special dd functionality because you can seek via blocksize/seek/count, but this is getting beyond my realm of knowledge |
Only the recovery data needs to fit in RAM, not the input data - so, in other words, your first example (64MB). Devices are interesting. I don't think they report their size, so you'd still need to tell ParPar that info, but the rest seems doable, yes. |
maybe you could use sfdisk?
|
I didn't want to get too platform specific, and I don't think it works if there's no partition table. It's probably better to get the user to put in Thanks for the suggestion nonetheless. Thinking about it a bit, maybe I can bypass the need for a known size if there's only one input file. The PAR2 format requires it for file ordering, which is then used in recovery computation, but if there's only one file, there's nothing to order, which means the computation could go ahead without a size... The code, as it is, does assume a known size in places, so I will have to check whether this is doable. |
Hi! Is it possible to pipe from stdin to create par files? (Say, backing up a drive and piping it from dd)
The text was updated successfully, but these errors were encountered: