# Get raw (unzipped) HTML when export using mitmdump -w filename (zlib)

**URL:** <https://discourse.mitmproxy.org/t/get-raw-unzipped-html-when-export-using-mitmdump-w-filename-zlib/135>\
**Category:** help\
**Created:** [August 10, 2016, 3:26am UTC](https://discourse.mitmproxy.org/t/get-raw-unzipped-html-when-export-using-mitmdump-w-filename-zlib/135 "2016-08-10T03:26:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ndhydev](https://avatars.discourse-cdn.com/v4/letter/n/b77776/32.png) [@ndhydev](https://discourse.mitmproxy.org/u/ndhydev)\
**Post date:** [August 10, 2016, 3:26am UTC](https://discourse.mitmproxy.org/t/get-raw-unzipped-html-when-export-using-mitmdump-w-filename-zlib/135/1 "2016-08-10T03:26:44Z")

</div>

Hi all,

We know that mitmproxy have ability to decode gzip content in `mitmproxy/netlib/encoding.py`, the decode is using zlib.  
When I try to export the flows to file with`mitmdump -w filename`, the file content is compressed and not readable. Is there a built-in way to get the unzipped content in exported file? Or is there a way to make zlib work on the file exporting process?

---

<div class="post-metadata">

**Author:** ![michaelschem](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@michaelschem](https://discourse.mitmproxy.org/u/michaelschem)\
**Post date:** [January 17, 2017, 6:18pm UTC](https://discourse.mitmproxy.org/t/get-raw-unzipped-html-when-export-using-mitmdump-w-filename-zlib/135/2 "2017-01-17T18:18:15Z")

</div>

I am trying to figure out the same thing. Has this been resolved?

---

<div class="post-metadata">

**Author:** ![mhils](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mitmproxy.org/mhils/32/7_2.png) [@mhils](https://discourse.mitmproxy.org/u/mhils)\
**Post date:** [January 17, 2017, 9:50pm UTC](https://discourse.mitmproxy.org/t/get-raw-unzipped-html-when-export-using-mitmdump-w-filename-zlib/135/3 "2017-01-17T21:50:54Z")

</div>

I would recommend using [https://github.com/mitmproxy/mitmproxy/blob/master/examples/simple/io\_read\_dumpfile.py](https://github.com/mitmproxy/mitmproxy/blob/master/examples/simple/io_read_dumpfile.py) to read mitmproxy dumpfiles. mitmproxy’s `flow.response.content` is automatically gzip-decoded (see [http://docs.mitmproxy.org/en/stable/scripting/api.html](http://docs.mitmproxy.org/en/stable/scripting/api.html)). If you want to avoid encodings at all, you could also pass `--anticomp` when recording. Does that help? 🙂
