public function stream_truncate($aSize): bool
    {
        if (strlen($this->string) > $aSize) {
            $this->string = substr($this->string, 0, $aSize);
        } elseif (strlen($this->string) < $aSize) {
            $this->string = str_pad($this->string, $aSize, "\0", STR_PAD_RIGHT);
        }

        return true;
    }