title: Read *.tar.gz file in python without extracting
body: <p>In python 3, I am trying to read files that resides in a tar.gz archive without extracting them (meaning without writing the extract files to disk). I found the tarfile module, and this is what I wrote (much simplified):</p>
  
  <pre><code>tar = tarfile.open('arhivename.tar.gz',encoding='utf-8')
  for x in tar.getmembers():
      filelikeobject=tar.extractfile(x)
      #pass the filelikeobject to a third party function that accepts file-like object that read strings
  
      #the following lines are for debug:
      r=filelikeobject.read()
      print(type(r).__name__) #prints out 'bytes' - need 'str'
  </code></pre>
  
  <p>the problem is, the tar.extractfile(x) returns a file object that returns bytes when calling read(). I need it to return str using utf-8 encoding</p>