hasIndefiniteLengthEnding static method

bool hasIndefiniteLengthEnding(
  1. Uint8List bytes
)

Checks if the given bytes ends with 0x00, 0x00

Implementation

static bool hasIndefiniteLengthEnding(Uint8List bytes) {
  var last = bytes.elementAt(bytes.length - 1);
  var lastMinus1 = bytes.elementAt(bytes.length - 2);
  if (last == 0 && lastMinus1 == 0) {
    return true;
  }
  return false;
}