{"success":true,"data":{"ext":"bpg","name":"Better Portable Graphicsimage format","description":"Better Portable Graphics (BPG) is an image file format created by Fabrice Bellard. It is used for storing still images and has been applied in web graphics, image compression, and archival workflows where smaller file sizes are desired. The format saw limited adoption and is now largely considered experimental; support is uncommon, so files may require specialized software, though the format itself does not present unusual security concerns.","mime":["image/x-bpg"],"risk_level":"Safe","signatures":[{"hex":"42 50 47 FB","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"},{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]}],"related":[],"usage":{"python":"def is_bpg(file_path: str) -> bool:\n    \"\"\"Check if file is a valid BPG by magic bytes.\"\"\"\n    signature = bytes([0x42, 0x50, 0x47, 0xFB])\n    with open(file_path, \"rb\") as f:\n        return f.read(4) == signature","node":"function isBPG(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x42, 0x50, 0x47, 0xFB]);\n  return buffer.subarray(0, 4).equals(signature);\n}","go":"func IsBPG(data []byte) bool {\n    signature := []byte{0x42, 0x50, 0x47, 0xFB}\n    if len(data) < 4 {\n        return false\n    }\n    return bytes.Equal(data[:4], signature)\n}"},"category":"Images"}}