decode method

  1. @override
String decode(
  1. Input input
)
override

Implementation

@override
String decode(Input input) {
  final size = CompactCodec.codec.decode(input);
  final bytes = input.readBytes(size);
  final decoded = utf8.decode(bytes);
  // Strip trailing null bytes that may exist in fixed-length string fields
  final nullIndex = decoded.indexOf('\x00');
  return nullIndex == -1 ? decoded : decoded.substring(0, nullIndex);
}