docs: def read(self,size):
      """read size bytes and return them"""
      done = 0 #number of bytes that have been read so far
      v = ''
      while True:
        if size-done < len(self._buffer['data']) - self._buffer_pos:
          v +=  self._buffer['data'][self._buffer_pos:self._buffer_pos+(size-done)]
          self._buffer_pos += (size-done)
          #self.pointer += size
          return v
        else: # we need more buffer
          vpart = self._buffer['data'][self._buffer_pos:]
          self._buffer = self._load_block()
          v += vpart
          self._buffer_pos = 0
          if len(self._buffer['data'])==0: return v
          done += len(vpart)