packString method
Implementation
void packString(String v) {
if (_buf.length - _offset < 4) _nextBuf();
final encoded = _strCodec.encode(v);
final length = encoded.length;
if (length <= 0xFFFFFFFF) {
packUint(Int64(length));
_putBytes(encoded);
} else {
throw ArgumentError('Max String length is 0xFFFFFFFF');
}
}