Closed mstange closed 6 months ago
This is actually harder than I initially realized. The cab
crate currently requires the input to implement Read + Seek
. I think we might need to fork it to use AsyncRead
and limit its use to cab files which never need to seek backwards.
For each item in a cab archive, the file contains a table which maps between compressed input file offsets and uncompressed output file offset ranges. These offsets could, in general, jump back and forth in the input file. But my expectation is that for most files they'll only move forwards.
This is implemented.
At the moment, for CAB-compressed files, we load the entire file into memory, then uncompress the entire thing, and then write it to disk.
We should do the decompression per chunk.