import { toUint8 as n, bytesMatch as g } from "./index-byte-helpers.js";
var I = n([73, 68, 51]), x = function(i, r) {
  r === void 0 && (r = 0), i = n(i);
  var u = i[r + 5], v = i[r + 6] << 21 | i[r + 7] << 14 | i[r + 8] << 7 | i[r + 9], d = (u & 16) >> 4;
  return d ? v + 20 : v + 10;
}, z = function a(i, r) {
  return r === void 0 && (r = 0), i = n(i), i.length - r < 10 || !g(i, I, {
    offset: r
  }) ? r : (r += x(i, r), a(i, r));
};
export {
  z as getId3Offset,
  x as getId3Size
};
