godotengine / godot-docs

Godot Engine official documentation
https://docs.godotengine.org
Other
3.79k stars 3.08k forks source link

itch.io supports GZIP compression for .wasm and .pck files #6692

Open necrashter opened 1 year ago

necrashter commented 1 year ago

Your Godot version: 3.5

Issue description: Godot docs state that itch.io doesn't provide compression for .wasm and .pck files, but itch.io documentation states otherwise in "Compressed file types" section.

URL to the documentation page: https://docs.godotengine.org/en/stable/tutorials/export/exporting_for_web.html#serving-the-files

Hosts that don't provide on-the-fly compression: itch.io, GitLab Pages (supports manual gzip precompression)

Calinou commented 1 year ago

itch.io also seems to support manual Brotli compression. This is something we should document as well, as the size reduction compared to on-the-fly gzip compression can be significant (20% or more).

Godot doesn't support creating Brotli compressed files on export, but this can be done using the Brotli command line tools.

necrashter commented 1 year ago

In this old comment you said that GitHub Pages don't use compression for .pck files. I couldn't find any info about this. Do you know whether this is still true?

Calinou commented 1 year ago

In this old comment you said that GitHub Pages don't use compression for .pck files. I couldn't find any info about this. Do you know whether this is still true?

Checking the response headers on https://gdscript-online.github.io/ returns content-encoding: gzip for the .wasm file, but not for the .pck file. Notice how the transferred PCK size is identical to the actual file size, unlike the WASM file:

image

index.pck is 330 KB when gzipped locally after downloading the file and running gzip index.pck, so the file is compressible.