Support for gzip on `.glb` (3D model) files?

glTF 2.0 is an open standard file format for 3D models, optimized for efficient transmission (on the web, for example). A quick GitHub search gives nearly 1000 repositories in results. The format comes in two variants, each with a different extension:

  • .glb efficiently packed binary data, in a single standalone file.

  • .gltf human-readable JSON, optionally referencing binary data in separate .bin or image files.

To my understanding, GitHub Pages applies gzip to some file types, but that list does not include either of the file extensions above. glTF models benefit substantially from gzip compression, and web content using WebXR APIs often rely heavily on glTF. It would be awesome if GitHub could include at least .glb, if not also .gltf and .bin, on the list of filetypes that automatically get gzip support when uploaded to GitHub pages. The .bin extension is not unique to glTF, so there may be other implications for enabling gzip there.

Alternatively, support for serving pre-compressed files would also greatly improve things for WebXR applications deployed on GitHub pages.

Thank you!

Disclaimer: I’m a contributor to the glTF format, three.js, and A-Frame.

5 Likes

Agree with this request, and just to give a sense of the magnitude of the issue:

  • for an actual glb asset I’m using on a project: 1.4Mb gzipped vs. 6.7Mb glb without gzip. It’s a big enough difference to consider a different web host other than GitHub pages for this use case to be able to specify gzip usage.
3 Likes