{"success":true,"data":{"ext":"roff","name":"ROFF","description":"ROFF is a text formatting language originally developed at Bell Labs and later maintained through Unix and GNU groff implementations. It is used to prepare manuals, technical documentation, and printed or paginated text for systems such as nroff and troff. As a legacy Unix format, ROFF files are generally safe to process, though they may contain escape sequences and macros that require compatible interpreters.","mime":["text/troff"],"risk_level":"Safe","signatures":[{"hex":"2E 5C 22","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":"27 5C 22","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":"27 2E 5C 22","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":"5C 22","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":"27 27 27","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":["man","me","ms","nroff","t","tr"],"usage":{"python":"def is_roff(file_path: str) -> bool:\n    \"\"\"Check if file is a valid ROFF by magic bytes.\"\"\"\n    signature = bytes([0x2E, 0x5C, 0x22])\n    with open(file_path, \"rb\") as f:\n        return f.read(3) == signature","node":"function isROFF(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x2E, 0x5C, 0x22]);\n  return buffer.subarray(0, 3).equals(signature);\n}","go":"func IsROFF(data []byte) bool {\n    signature := []byte{0x2E, 0x5C, 0x22}\n    if len(data) < 3 {\n        return false\n    }\n    return bytes.Equal(data[:3], signature)\n}"}}}