src/Protocol/Fetch.php
protected function encodeFetchPartition(array $values): string
    {
        if (! isset($values['partition_id'])) {
            throw new ProtocolException('given fetch data invalid. `partition_id` is undefined.');
        }

        if (! isset($values['offset'])) {
            $values['offset'] = 0;
        }

        if (! isset($values['max_bytes'])) {
            $values['max_bytes'] = 2 * 1024 * 1024;
        }

        $data  = self::pack(self::BIT_B32, (string) $values['partition_id']);
        $data .= self::pack(self::BIT_B64, (string) $values['offset']);
        $data .= self::pack(self::BIT_B32, (string) $values['max_bytes']);

        return $data;
    }
protected function encodeFetchPartition(array $values): string
    {
        if (! isset($values['partition_id'])) {
            throw new ProtocolException('given fetch data invalid. `partition_id` is undefined.');
        }

        if (! isset($values['offset'])) {
            $values['offset'] = 0;
        }

        if (! isset($values['max_bytes'])) {
            $values['max_bytes'] = 2 * 1024 * 1024;
        }

        $data  = self::pack(self::BIT_B32, (string) $values['partition_id']);
        $data .= self::pack(self::BIT_B64, (string) $values['offset']);
        $data .= self::pack(self::BIT_B32, (string) $values['max_bytes']);

        return $data;
    }
@param mixed[] $values

@throws ProtocolException