getCompactLengthInfos method

Tuple<int, int> getCompactLengthInfos(
  1. int offset, {
  2. bool sign = false,
})

Implementation

Tuple<int, int> getCompactLengthInfos(int offset, {bool sign = false}) {
  final length = LayoutSerializationUtils.decodeLength(_maxOffset(offset, 12),
      sign: sign);
  if (!length.item2.isValidInt) {
    throw const LayoutException("compact value is too large for length.");
  }
  return Tuple(length.item1, length.item2.toInt());
}