parameters: (self, size)
return_statement: return buf
docstring: Return size bytes from the stream.
docstring_summary: Return size bytes from the stream.
docstring_tokens: Return size bytes from the stream .
function: def _read(self, size):
          """Return size bytes from the stream.
          """
          if self.comptype == "tar":
              return self.__read(size)
  
          c = len(self.dbuf)
          while c < size:
              buf = self.__read(self.bufsize)
              if not buf:
                  break
              try:
                  buf = self.cmp.decompress(buf)
              except IOError:
                  raise ReadError("invalid compressed data")
              self.dbuf += buf
              c += len(buf)
          buf = self.dbuf[:size]
          self.dbuf = self.dbuf[size:]
          return buf
function_tokens: def _read ( self , size ) : if self . comptype == "tar" : return self . __read ( size ) c = len ( self . dbuf ) while c < size : buf = self . __read ( self . bufsize ) if not buf : break try : buf = self . cmp . decompress ( buf ) except IOError : raise ReadError ( "invalid compressed data" ) self . dbuf += buf c += len ( buf ) buf = self . dbuf [ : size ] self . dbuf = self . dbuf [ size : ] return buf