docs: def __save(self, b):
          '''
              saves the given data to the buffer
          :param b:
          '''
          newbufferidx = (self.__bufferidx + len(b))
          self.__buffer[self.__bufferidx:newbufferidx] = b
          #update buffer index
          self.__bufferidx = newbufferidx