# How to use GZip compression with .GLB files?

**URL:** <https://discourse.threejs.org/t/how-to-use-gzip-compression-with-glb-files/24369>\
**Category:** Questions\
**Tags:** draco, compression, decompression, gltf-loader\
**Created:** [March 14, 2021, 11:47am UTC](https://discourse.threejs.org/t/how-to-use-gzip-compression-with-glb-files/24369 "2021-03-14T11:47:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saydala](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/saydala/32/7943_2.png) [@Saydala](https://discourse.threejs.org/u/Saydala)\
**Post date:** [March 14, 2021, 11:47am UTC](https://discourse.threejs.org/t/how-to-use-gzip-compression-with-glb-files/24369/1 "2021-03-14T11:47:02Z")

</div>

Hello all,  
I’m working on a medical project at scene optimization phase.  
I used draco compression for scene environment models like clinic and hospital loopy and mesh optimizer for animated characters as advised from this answer ([https://discourse.threejs.org/t/draco-animation/10945/6](https://discourse.threejs.org/t/draco-animation/10945/6)).

How to add .gz extension and use that kind of extra compression on my .GLB models?

I noticed that a lot of answers talked about GZIP but no one explains how to use it.

Thank You.

---

<div class="post-metadata">

**Author:** ![Fatjon\_Rrapaj](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/fatjon_rrapaj/32/18506_2.png) [@Fatjon\_Rrapaj](https://discourse.threejs.org/u/Fatjon_Rrapaj)\
**Post date:** [January 21, 2022, 6:27pm UTC](https://discourse.threejs.org/t/how-to-use-gzip-compression-with-glb-files/24369/2 "2022-01-21T18:27:01Z")

</div>

Hello, you can use [gltf-transform cli](https://gltf-transform.donmccurdy.com/cli.html) to GZIP your .glb

---

<div class="post-metadata">

**Author:** ![donmccurdy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/donmccurdy/32/33209_2.png) [@donmccurdy](https://discourse.threejs.org/u/donmccurdy)\
**Post date:** [January 24, 2022, 12:27am UTC](https://discourse.threejs.org/t/how-to-use-gzip-compression-with-glb-files/24369/3 "2022-01-24T00:27:19Z")

</div>

Any general-purpose gzip software (like [gzip-cli - npm](https://www.npmjs.com/package/gzip-cli)) will also compress GLB files.

If your webserver supports gzip headers correctly (most do, but GitHub Pages notably does not…) then the gzip will be decompressed automatically by the web browser and there’s nothing else you need to do. For some webservers you may need to look up how to configure gzip hosting.
