JSZip
javascriptのzip操作ライブラリ
JSZip
JSZip API
https://github.com/Stuk/jszip
nested zipのData descriptorなどのsignature判定もできる
https://github.com/Stuk/jszip/pull/31
web標準のReadableStreamは読めないようだ
実行
code:sample.js
(async () => {
const { default: JSZip } = await import("https://cdn.jsdelivr.net/npm/jszip@3.10.1/+esm");
const zip = new JSZip();
const readableStream = (
await fetch("data:image/gif;base64,R0lGODdhBQAFAIACAAAAAP/eACwAAAAABQAFAAACCIwPkWerClIBADs=")
).body;
zip.file("smile.gif", readableStream);
const blob = await zip.generateAsync({ type: "blob" });
open(URL.createObjectURL(blob));
})();
#2024-09-24 21:32:51
#2023-02-20 18:00:42
#2022-07-26 17:57:51