{"success":true,"data":{"ext":"m3u8","name":"M3U8","description":"M3U8 is a UTF-8 encoded variant of the M3U playlist format, originally associated with Winamp and maintained through broad industry use rather than by a formal standards body. It is used to define media playlists for audio and video playback, especially in HTTP Live Streaming (HLS) and other streaming applications. The format is generally safe, though playlists may reference remote media or network resources that should be trusted before use.","mime":["application/vnd.apple.mpegurl"],"risk_level":"Safe","signatures":[{"hex":"23 45 58 54 4D 33 55","offset":0,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"},{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]}],"related":["m3u"],"usage":{"python":"def is_m3u8(file_path: str) -> bool:\n    \"\"\"Check if file is a valid M3U8 by magic bytes.\"\"\"\n    signature = bytes([0x23, 0x45, 0x58, 0x54, 0x4D, 0x33, 0x55])\n    with open(file_path, \"rb\") as f:\n        return f.read(7) == signature","node":"function isM3U8(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x23, 0x45, 0x58, 0x54, 0x4D, 0x33, 0x55]);\n  return buffer.subarray(0, 7).equals(signature);\n}","go":"func IsM3U8(data []byte) bool {\n    signature := []byte{0x23, 0x45, 0x58, 0x54, 0x4D, 0x33, 0x55}\n    if len(data) < 7 {\n        return false\n    }\n    return bytes.Equal(data[:7], signature)\n}"}}}