Skip to content

feat: implement Compression and Decompression streams  #35

@grabbou

Description

@grabbou

Last piece for the showcase.

This should work:

  const [fileHandle] = await showOpenFilePicker()
  const file = await fileHandle.getFile()

  const compressed = file.stream().pipeThrough(new CompressionStream('gzip'))

  await fetch('http://localhost:3002/upload', {
    method: 'POST',
    body: compressed,
  })

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions