# Dfx deploy gzip

**URL:** <https://forum.dfinity.org/t/dfx-deploy-gzip/23651>\
**Category:** Developers\
**Created:** [October 10, 2023, 4:06pm UTC](https://forum.dfinity.org/t/dfx-deploy-gzip/23651 "2023-10-10T16:06:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [October 10, 2023, 4:06pm UTC](https://forum.dfinity.org/t/dfx-deploy-gzip/23651/1 "2023-10-10T16:06:33Z")

</div>

Isn’t dfx suppose to use gzip per default for deployment purpose?

If yes, as of which version?  
If no, there is an option to turn this on?

> Error: Failed while trying to deploy canisters.  
> Caused by: Failed while trying to deploy canisters.  
> Failed while trying to install all canisters.  
> Failed to install wasm module to canister ‘backend’.  
> Failed during wasm installation call: The replica returned an HTTP Error: Http Error: status 413 Payload Too Large, content type “application/cbor”, content: Request 0x8a5562243e01ff6ab763f20fd3aaed4d93dc60b0ba58bfbc1a1f75dd5a852c28 is too large. Message byte size 2260078 is larger than the max allowed 2097152.

```auto
"canisters": {
    "backend": {
      "type": "rust",
      "package": "backend",
      "candid": "src/backend/backend.did",
      "optimize": "cycles"
    }
  }

```

> ❯ ls -ltr .dfx/local/canisters/backend/  
> total 4472  
> -rw-r–r-- 1 daviddalbusco staff 1561 9 oct 21:49 constructor.old.did  
> -rw-rw-rw- 1 daviddalbusco staff 2334 10 oct 18:03 constructor.did  
> -rw-rw-rw- 1 daviddalbusco staff 2327 10 oct 18:04 service.did  
> -rw-rw-rw- 1 daviddalbusco staff 2 10 oct 18:04 init\_args.txt  
> -rw-r–r-- 1 daviddalbusco staff 2259670 10 oct 18:04 backend.wasm  
> -rw-r–r-- 1 daviddalbusco staff 3316 10 oct 18:04 service.did.js  
> -rw-r–r-- 1 daviddalbusco staff 2836 10 oct 18:04 service.did.d.ts  
> -rw-r–r-- 1 daviddalbusco staff 1959 10 oct 18:04 index.js

---

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [October 10, 2023, 4:10pm UTC](https://forum.dfinity.org/t/dfx-deploy-gzip/23651/2 "2023-10-10T16:10:51Z")

</div>

Ok, for some reason it is not the default. The option is called `gzip`.

```auto
"canisters": {
    "backend": {
      "type": "rust",
      "package": "backend",
      "candid": "src/backend/backend.did",
      "optimize": "cycles",
      "gzip": true
    }
  }

```
