{"success":true,"data":{"ext":"gpkg","name":"GPKG","description":"GeoPackage (GPKG) is an open geospatial container format based on SQLite, defined and maintained by the Open Geospatial Consortium (OGC). It is used to store maps, vector features, rasters, attribute data, and styling information in a single portable file for GIS applications, mobile mapping, and offline data exchange. The format has no special security concerns beyond those of ordinary database files, though any embedded content should be handled cautiously.","mime":["application/x-geopackage","application/x-geopackage; version=1.1Or1.0"],"risk_level":"Safe","signatures":[{"hex":"53 51 4C 69 74 65 20 66 6F 72 6D 61 74 20 33 00","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":["db","sqlite","sqlitedb"],"usage":{"python":"def is_gpkg(file_path: str) -> bool:\n    \"\"\"Check if file is a valid GPKG by magic bytes.\"\"\"\n    signature = bytes([0x53, 0x51, 0x4C, 0x69, 0x74, 0x65, 0x20, 0x66, 0x6F, 0x72, 0x6D, 0x61, 0x74, 0x20, 0x33, 0x00])\n    with open(file_path, \"rb\") as f:\n        return f.read(16) == signature","node":"function isGPKG(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x53, 0x51, 0x4C, 0x69, 0x74, 0x65, 0x20, 0x66, 0x6F, 0x72, 0x6D, 0x61, 0x74, 0x20, 0x33, 0x00]);\n  return buffer.subarray(0, 16).equals(signature);\n}","go":"func IsGPKG(data []byte) bool {\n    signature := []byte{0x53, 0x51, 0x4C, 0x69, 0x74, 0x65, 0x20, 0x66, 0x6F, 0x72, 0x6D, 0x61, 0x74, 0x20, 0x33, 0x00}\n    if len(data) < 16 {\n        return false\n    }\n    return bytes.Equal(data[:16], signature)\n}"},"category":"Databases"}}