decodeLengthWithDetails static method
Implementation
static Tuple<int, int> decodeLengthWithDetails(List<int> bytes) {
final decode = decodeLength(bytes, sign: false);
if (!decode.item2.isValidInt) {
throw const MessageException("Invalid variable length. length to large.");
}
final bytesLength = decode.item2.toInt();
final dataOffset = decode.item1;
final totalLength = bytesLength + dataOffset;
return Tuple(dataOffset, totalLength);
}