varIntSize static method

int varIntSize(
  1. int flag
)

The first Byte of a Uint8List of type VarInt, defines the size of the Segment associated.

Implementation

static int varIntSize(int flag) {
  switch(flag) {
    case 0xFD: return 3;
    case 0xFE: return 5;
    case 0xFF: return 9;
    default: return 1;
  }
}