ulebDecode function
Implementation
(int, int) ulebDecode(Uint8List arr) {
int total = 0;
int shift = 0;
int len = 0;
while (true) {
int byte = arr[len];
len += 1;
total |= (byte & 0x7f) << shift;
if ((byte & 0x80) == 0) {
break;
}
shift += 7;
}
return (total, len);
}