{"success":true,"data":{"ext":"lib","name":"Unix archiver","description":"The Unix archiver (ar) format is a legacy archive file format originally created for Unix systems and now specified by POSIX, with implementations maintained by operating system and toolchain vendors. It is used to combine object files and other resources into static libraries, and is commonly processed by archivers, linkers, and build tools. The format is simple and generally safe, though malformed archives may trigger errors in older utilities.","mime":[],"risk_level":"Safe","signatures":[{"hex":"21 3C 61 72 63 68 3E 0A","offset":0,"sources":[{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]}],"related":["deb","udeb"],"usage":{"python":"def is_lib(file_path: str) -> bool:\n    \"\"\"Check if file is a valid LIB by magic bytes.\"\"\"\n    signature = bytes([0x21, 0x3C, 0x61, 0x72, 0x63, 0x68, 0x3E, 0x0A])\n    with open(file_path, \"rb\") as f:\n        return f.read(8) == signature","node":"function isLIB(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x21, 0x3C, 0x61, 0x72, 0x63, 0x68, 0x3E, 0x0A]);\n  return buffer.subarray(0, 8).equals(signature);\n}","go":"func IsLIB(data []byte) bool {\n    signature := []byte{0x21, 0x3C, 0x61, 0x72, 0x63, 0x68, 0x3E, 0x0A}\n    if len(data) < 8 {\n        return false\n    }\n    return bytes.Equal(data[:8], signature)\n}"}}}