matches method

bool matches(
  1. Uint8List bytes
)

Whether this signature matches bytes.

Implementation

bool matches(Uint8List bytes) {
  if (offset < 0 || magic.isEmpty || bytes.length < offset + magic.length) {
    return false;
  }
  for (int index = 0; index < magic.length; index += 1) {
    if (bytes[offset + index] != magic[index]) {
      return false;
    }
  }
  return true;
}