guest271314
unread,Jul 10, 2022, 2:24:06 PM7/10/22Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to blink-network-dev, PhistucK, blink-network-dev, guest271314
I tried .gz, .zip and .tar.gz. The GoogleChromeLabs demo fails to decompress any of the archives.
Test
(async()=>{
readable = new ReadableStream({
start(c) {
c.enqueue(new TextEncoder().encode('a'.repeat(1000)));
c.close();
}
}).pipeThrough(new CompressionStream('gzip'));
handle = await showSaveFilePicker({
startIn: 'downloads',
suggestedName: 'test.gz'
});
console.log(handle);
writable = await handle.createWritable();
await readable.pipeTo(writable);
}
)();
I can read the archive with
request = (await fetch('chrome-extension://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/test.gz')).body.pipeThrough(new DecompressionStream('gzip'))
text = await new Response(request).text();
console.log(text);
Thus the question: What file extension to set for archives created by new CompressionStream('gzip')?