{"success":true,"data":{"ext":"j2k","name":"J2K","description":"J2K is the JPEG 2000 codestream format, developed by the Joint Photographic Experts Group (JPEG) and standardized by ISO/IEC and ITU. It is used for still image storage, digital archiving, medical imaging, and workflows that require scalable compression or lossless encoding. The format is generally safe, though image decoders have historically been a target for parsing vulnerabilities; files from untrusted sources should be opened with current software.","mime":[],"risk_level":"Safe","signatures":[{"hex":"00 00 00 0C 6A 50 20 20 0D 0A 87 0A","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]}],"related":["jp2","jpf","jpx","avif","bmp","cr2"],"usage":{"python":"def is_j2k(file_path: str) -> bool:\n    \"\"\"Check if file is a valid J2K by magic bytes.\"\"\"\n    signature = bytes([0x00, 0x00, 0x00, 0x0C, 0x6A, 0x50, 0x20, 0x20, 0x0D, 0x0A, 0x87, 0x0A])\n    with open(file_path, \"rb\") as f:\n        return f.read(12) == signature","node":"function isJ2K(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x00, 0x00, 0x00, 0x0C, 0x6A, 0x50, 0x20, 0x20, 0x0D, 0x0A, 0x87, 0x0A]);\n  return buffer.subarray(0, 12).equals(signature);\n}","go":"func IsJ2K(data []byte) bool {\n    signature := []byte{0x00, 0x00, 0x00, 0x0C, 0x6A, 0x50, 0x20, 0x20, 0x0D, 0x0A, 0x87, 0x0A}\n    if len(data) < 12 {\n        return false\n    }\n    return bytes.Equal(data[:12], signature)\n}"},"category":"Images"}}