'use strict';
module.exports = function (buf) {
  if (!buf || buf.length < 8) return false;

  return /^gimp xcf/.test(buf);
};

'use strict';
module.exports = function (buf) {
  if (!buf || buf.length < 8) return false;

  // gimp xcf files start with "gimp xcf"
  return buf[0] === 103 &&
         buf[1] === 105 &&
         buf[2] === 109 &&
         buf[3] === 112 &&
         buf[4] === 32 &&
         buf[5] === 120 &&
         buf[6] === 99 &&
         buf[7] === 102;
};

Revert "make the xcf check a bit more readable"
Revert "make the xcf check a bit more readable"

Definitely does not work with Uint8Arrays

This reverts commit 845f6e2c9f8931d5b6af075280ee28785f032e6e.
