Would Piping Stream actually zip fiel? #93
Replies: 1 comment
-
|
Hi Gregory. CompressionStream would, of course, be the main ingredient of adding compression to the list of supported features for client-zip. Though it wouldn't be used quite in that spot in the code. Naturally, there are some other things to change in order to follow the ZIP specification. A couple of times for each file in the archive, the compression type and compressed file size have to be stored (alongside the uncompressed size and CRC-32, which is one reason that you can't pipe though a CompressionStream just where you pointed, since the code that computes the size and CRC happens later in the pipeline and of course it needs the uncompressed stream). Enabling compression also means that we can't predict the final size of the archive, and the interaction between those features would have to be handled gracefully. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
https://developer.mozilla.org/en-US/docs/Web/API/Compression_Streams_API#examples
client-zip/src/input.ts
Line 38 in 7fcc01b
Beta Was this translation helpful? Give feedback.
All reactions