Hecks, That indeed is what I mean. If you want to keep the rars it indeed does not add any value. You could use ReScene Data Recovery Archive tool to reconstruct them though... Note that I'm only suggesting it to be a selectable option and maybe not even the default one
So in steps what I suggest.
0. NZB download -> sort files in right order -> download .par2 file and create file list
For each archive file:
1. Download the parts to RAM
2. Decode the parts to archive file in RAM (note that AB can continue downloading parts for the next file)
3. Check the file integrity -> store which blocks are OK and which are corrupted / missing
4. Unrar to HDD (or continue unrarring with this file) and dont stop when errors are encountered
5. Store archive header (just like the ReScene Data Recovery Archive tool does) in RAM or in sepperate file on HDD
6. Remove archive from RAM
Do this until all archive files are downloaded and extracted
@4 With scene releases the movie/iso is only stored, so instead of unrarring you can also just remove the headers and write it all to disk.
@4 If an entire file is missing, make sure space is left over in the file (just like for missing blocks)
If blocks were found missing or corrupted, start repair of extracted archive:
11. Unpause / download number of required extra blocks to HDD (as found in step 3.)
12. Construct RS matrix with exponents from 11. (using data from step 3.)
13. Reconstruct missing blocks with RS matrix and all blocks from the extracted file, by using the stored archive headers to reconstuct original archive files / original blocks (on the fly, one archive file file at a time, no need to store the archive files themselves in RAM)
14. Write missing blocks directly to the extracted file (taking into account archive file headers)
And voila. We only wrote to the HDD in step 4 and 14, we only read from disk in step 13. (assuming the ReScene Data is kept in RAM). So in summary: we need a lot less HDD activity using this method. The difficulty is that all processes have to be running at the same time and waiting for eachother: encoding, then verifying, then unrarring. This makes it impossible to use the stand-alone par2.exe and unrar.dll, but require the code to be integrated.
Note that coping with exiting the program while downloading and continuing when restarted might be a bit more tricky than normal and crashing / unexpected shutdown could result in loosing then entire download.
Hope this clarifies what I was thinking...