{"success":true,"data":{"ext":"ps","name":"PostScript file","description":"PostScript is a page description language developed by Adobe Systems and standardized by Adobe for controlling text, graphics, and page layout in printed output. It is used for desktop publishing, printing workflows, vector graphics, and generating document output from applications and printers. As a legacy format, PostScript code can execute instructions during rendering, so files from untrusted sources should be handled with care.","mime":["application/postscript"],"risk_level":"Safe","signatures":[{"hex":"25 21","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":"04 25 21","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":"C5 D0 D3 C6","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":"25 21 50 53 2D 41 64 6F 62 65 2D 33 2E 30 20 45 50 53 46 2D 33 2E 30","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":"25 21 50 53","offset":0,"sources":[{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"}]},{"hex":"25 21 50 53 2D 41 64 6F 62 65 2D","offset":0,"sources":[{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]}],"related":["eps","epsi","epub","mobi","oxps","pdf"],"usage":{"python":"def is_ps(file_path: str) -> bool:\n    \"\"\"Check if file is a valid PS by magic bytes.\"\"\"\n    signature = bytes([0x25, 0x21])\n    with open(file_path, \"rb\") as f:\n        return f.read(2) == signature","node":"function isPS(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x25, 0x21]);\n  return buffer.subarray(0, 2).equals(signature);\n}","go":"func IsPS(data []byte) bool {\n    signature := []byte{0x25, 0x21}\n    if len(data) < 2 {\n        return false\n    }\n    return bytes.Equal(data[:2], signature)\n}"},"category":"Documents"}}