Creative Analyzer - v0.0.1
    Preparing search index...

    Function sniffContentType

    • Detect MIME type from leading bytes. Exported for unit tests.

      Recognises: JPEG, PNG, GIF, WebP, MP4/MOV (ISO BMFF "ftyp"), WebM/Matroska.

      Parameters

      • buffer: ArrayBuffer

        The downloaded bytes.

      Returns string | null

      A canonical MIME (image/png, video/mp4, ...) or null if no signature matches. Caller falls back to the declared Content-Type.