final private static function encodeString(string $data): string
    {
        $buf = '';
        self::encodeUnsigned($buf, strlen($data));
        return $buf . $data;
    }
final private static function encodeString(string $data): string
    {
        $buf = '';
        self::encodeUnsigned($buf, strlen($data));
        return $buf . $data;
    }
final private static function encodeString ( string $ data ) : string { $ buf = '' ; self :: encodeUnsigned ( $ buf , strlen ( $ data ) ) ; return $ buf . $ data ; }
Encodes message payload by prefixing the message length as unsigned varint.

@param string $data The message payload to prefix.
@return string returns The unsigned varint length prefixed payload.
Encodes message payload by prefixing the message length as unsigned varint .