5 ms·
> But, that contradicts 4.1.9 that says zip files maybe be streamed. If zip files can be streamed then both of the example above would fail because in the first
by geocar 6y ago
> But, that contradicts 4.1.9 that says zip files maybe be streamed. If zip files can be streamed then both of the example above would fail because in the first case we'd see file B and in the second we'd see file A (old) before we saw that the central directory doesn't reference them. If you have to wait for the central directory before you can correctly use any of the entries then functionally you can not stream zip files.
You cannot filter a particular file in a stream using UNIX fifos and constant memory, but you could replace the old file A with the second file A in the stream because it is later. In this way, yes you can consume a zip file in a streaming way, even if you have to wait until the end to pass any of the output to another process.
TAR and CPIO have the same "feature".
- greggman3 6y agoNo you can't because the definition of "streaming" is to use the data as it comes down the wire. So CMD.BAT format disk CMD.BAT rem format disk If the TOC only points to the second CMD.BAT then executing the first one as you stream it is wrong.
- geocar 6y ago> If the TOC only points to the second CMD.BAT then executing the first one as you stream it is wrong. The output directory contains the second CMD.BAT when you're done processing, whether you use the streaming algorithm or you consult the TOC, because in the streaming algorithm you simply overwrite the second CMD.BAT (if you created it as a result of the first CMD.BAT) with the new contents.