title: Can python fileinput's openhook option stack together both hook_compressed and hook_encoded?
body: <p>I'm reading a compressed file; the uncompressed data should be interpreted as UTF-8. So I'd sort of like to use both <code>hook_compressed</code> and <code>hook_encoded</code>, in the <code>fileinput</code> <code>openhook</code> parameter. But, I don't see a way to stack/wrap them. </p>
  
  <p>On the off chance the existing hooks took file-like objects, not just filenames, I gave this a try:</p>
  
  <pre><code>def myhook(file,mode):
      return (fileinput.hook_encoded("utf-8"))(fileinput.hook_compressed(file,mode),mode)
  </code></pre>
  
  <p>...but no such luck. </p>