Skip to content

Use compression for tus uploads #284

@JoeOsborn

Description

@JoeOsborn

We have an annoying issue where because we upload uncompressed files to tus, we can't take advantage of compression to reduce the size of uploads of large files like states and replays.

It would be ideal to use accept-encoding: br on downloads and content-encoding: br on uploads, but the way tus works it's a bunch of separate requests and we'd get better compression by compressing before uploading.

Since we would prefer the native implementation of compression in e.g. CompressionStream, we're stuck with gzip. So the idea is that we'd compress the uploaded file using the browser, upload to tus, and then on the server decompress and recompress with whatever we want so that when we download it using accept-encoding: br or accept-encoding: whatever it will all just work.

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