{"success":true,"data":{"ext":"lz4","name":"LZ4","description":"LZ4 is a lossless data compression format and algorithm created by Yann Collet and maintained by the LZ4 project. It is commonly used for fast compression and decompression in software distribution, archival tools, network transfer, and in-memory data processing. LZ4 files are generally considered safe to open, though decompression can require significant resources for large or malformed inputs, so files from untrusted sources should still be handled with standard caution.","mime":["application/x-lz4"],"risk_level":"Safe","signatures":[{"hex":"18 4D 22 04","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"}]},{"hex":"18 4C 21 02","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"}]}],"related":[],"usage":{"python":"def is_lz4(file_path: str) -> bool:\n    \"\"\"Check if file is a valid LZ4 by magic bytes.\"\"\"\n    signature = bytes([0x18, 0x4D, 0x22, 0x04])\n    with open(file_path, \"rb\") as f:\n        return f.read(4) == signature","node":"function isLZ4(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x18, 0x4D, 0x22, 0x04]);\n  return buffer.subarray(0, 4).equals(signature);\n}","go":"func IsLZ4(data []byte) bool {\n    signature := []byte{0x18, 0x4D, 0x22, 0x04}\n    if len(data) < 4 {\n        return false\n    }\n    return bytes.Equal(data[:4], signature)\n}"}}}