{"success":true,"data":{"ext":"tgz","name":"GZIP archive file","description":"The GZIP archive format is a compressed file format created by Jean-loup Gailly and Mark Adler and maintained through the GNU Project. It is commonly used to reduce file size and distribute software packages, source code archives, backups, and Unix tarballs, often as .tgz files. The format is widely supported and generally safe, although archives from untrusted sources can hide unexpected contents or path traversal issues during extraction.","mime":["application/gzip"],"risk_level":"Safe","signatures":[{"hex":"1F 8B","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":"1F 8B 08","offset":0,"sources":[{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]}],"related":["gz","7z","ace","arj","bz","bz2"],"usage":{"python":"def is_tgz(file_path: str) -> bool:\n    \"\"\"Check if file is a valid TGZ by magic bytes.\"\"\"\n    signature = bytes([0x1F, 0x8B])\n    with open(file_path, \"rb\") as f:\n        return f.read(2) == signature","node":"function isTGZ(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x1F, 0x8B]);\n  return buffer.subarray(0, 2).equals(signature);\n}","go":"func IsTGZ(data []byte) bool {\n    signature := []byte{0x1F, 0x8B}\n    if len(data) < 2 {\n        return false\n    }\n    return bytes.Equal(data[:2], signature)\n}"},"category":"Archives"}}