isWebp method

bool isWebp ()

check is webp file

Implementation

bool isWebp() {
  final riffHeader = MoreList.compare(
      <int>[82, 73, 70, 70], codeUnits.sublist(0, 4)); // 'RIFF'
  final webpHeader = MoreList.compare(
      <int>[87, 69, 66, 80], codeUnits.sublist(8, 12)); // 'WEBP'
  final vp8Header =
      MoreList.compare(<int>[86, 80, 56], codeUnits.sublist(12, 15)); // 'VP8'
  return riffHeader && webpHeader && vp8Header;
}