# Gzip decompression in Edge

**URL:** <https://discuss.google.dev/t/gzip-decompression-in-edge/9064>\
**Category:** Apigee\
**Tags:** api-runtime\
**Created:** [August 19, 2016, 2:44pm UTC](https://discuss.google.dev/t/gzip-decompression-in-edge/9064 "2016-08-19T14:44:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous8](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@anonymous8](https://discuss.google.dev/u/anonymous8)\
**Post date:** [August 19, 2016, 2:44pm UTC](https://discuss.google.dev/t/gzip-decompression-in-edge/9064/1 "2016-08-19T14:44:14Z")

</div>

We have a requirement where we need to decompress gzip string in Apigee Edge before sending it to Target Server.

Consuming app will be sending gzip data but target server doesn’t support gzip format. So we need to decompress in Apigee.

How to achieve this ?

I tried using Content-Encoding : gzip and then passed the gzip data. But i am getting following error :

```auto
{
  "fault": {
    "faultstring": "Failed to Decompress",
    "detail": {
      "errorcode": "messaging.adaptors.http.DecompressionFailure"
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![anonymous8](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@anonymous8](https://discuss.google.dev/u/anonymous8)\
**Post date:** [August 19, 2016, 2:45pm UTC](https://discuss.google.dev/t/gzip-decompression-in-edge/9064/2 "2016-08-19T14:45:06Z")

</div>

[@mdunker@apigee.com](https://community.apigee.com/users/89/mdunkerapigeecom.html) [@Mike Dunker](https://community.apigee.com/users/3878/mdunkercustomtargets.html)

Can you please help ?

---

<div class="post-metadata">

**Author:** ![mdunker](https://d3byx8b92xw3lq.cloudfront.net/user_avatar/discuss.google.dev/mdunker/32/24334_2.png) [@mdunker](https://discuss.google.dev/u/mdunker)\
**Post date:** [August 19, 2016, 4:35pm UTC](https://discuss.google.dev/t/gzip-decompression-in-edge/9064/3 "2016-08-19T16:35:01Z")

</div>

Hi [@Swapnil Raverkar](https://community.apigee.com/users/3991/swapnilraverkar.html) - this is an Edge question, not BaaS – I’ve pinged internal people to see if they can help.

---

<div class="post-metadata">

**Author:** ![anonymous8](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@anonymous8](https://discuss.google.dev/u/anonymous8)\
**Post date:** [August 19, 2016, 4:50pm UTC](https://discuss.google.dev/t/gzip-decompression-in-edge/9064/4 "2016-08-19T16:50:26Z")

</div>

Hi,

Are you really sending gzip data? That error usually occurs if the data is not compressed.

Create a gzip file, something small for testing using “gzip filename”, then send it will curl, you’ll need to fix up the DNS to reflect your own org/env.

curl -v -X POST -H “Content-Encoding: gzip” http://{your-org}-test.apigee.net/\<your\_api\>; -d @.gz

If that works set your target server properties. See:

[http://docs.apigee.com/api-services/reference/endpoint-properties-reference](http://docs.apigee.com/api-services/reference/endpoint-properties-reference)

property is: compression.algorithm, set to ‘none’

---

<div class="post-metadata">

**Author:** ![anonymous8](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@anonymous8](https://discuss.google.dev/u/anonymous8)\
**Post date:** [August 22, 2016, 12:43am UTC](https://discuss.google.dev/t/gzip-decompression-in-edge/9064/5 "2016-08-22T00:43:23Z")

</div>

I was trying with Postman to submit a gzip compressed file, which wasn’t getting submitted properly it seems.

It’s working as expected now & Edge is decompressing the file.
