prependVarint static method
Prepends a variable-length integer encoding of the given data length to the provided data.
Implementation
static List<int> prependVarint(List<int> data) {
final varintBytes = encodeVarint(data.length);
return [...varintBytes, ...data];
}