public function chunk(int $size = 1): StreamInterface
    {
        $stream = new Stream(self::class);
        $string = $this;

        while ($string->length() > 0) {
            $stream = $stream->add($string->substring(0, $size));
            $string = $string->substring($size);
        }

        return $stream;
    }