title: How to iterate / stream a gzip file (containing a single csv)?
body: <p>How to iterate over a gziped file which contains a single text file (csv)?</p>
  
  <p>Searching crates.io I found <a href="https://crates.io/crates/flate2" rel="nofollow noreferrer">flate2</a> which has the following code example for decompression:</p>
  
  <pre><code>extern crate flate2;
  
  use std::io::prelude::*;
  use flate2::read::GzDecoder;
  
  fn main() {
      let mut d = GzDecoder::new("...".as_bytes()).unwrap();
      let mut s = String::new();
      d.read_to_string(&amp;mut s).unwrap();
      println!("{}", s);
  }
  </code></pre>
  
  <p>How to stream a gzip csv file?</p>