Skip to content

Instantly share code, notes, and snippets.

@ochafik
Created November 29, 2021 13:22
Show Gist options
  • Select an option

  • Save ochafik/4bd749504828750c895f38e626684cb3 to your computer and use it in GitHub Desktop.

Select an option

Save ochafik/4bd749504828750c895f38e626684cb3 to your computer and use it in GitHub Desktop.
Decompress from data uri
async () => {
let data = (await fetch('data:base64, abc' )) .blob ();
let blob = await new Response(blob, stream(), pipeThrough (new
DecompressionStream("br'))).blob();
Object.assign(new FileReader(), {
onload: (e) => window. location. replace(e. target. result)
}).readAsDataURL (blob);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment