Flyfish File Viewer 的独立 OrCAD / Allegro 二进制检查内核包。它提供 CFB/OLE2 检测、安全文本采样、十六进制预览和字符串抽取等底层能力,不包含 UI。
import {
isOrcadCompoundFile,
collectOrcadStrings,
decodeOrcadSample,
} from '@file-viewer/eda-orcad'
const bytes = new Uint8Array(buffer)
const isCfb = isOrcadCompoundFile(bytes)
const strings = collectOrcadStrings([bytes])
const sample = decodeOrcadSample(bytes)
.olb、.dra、.psm、.pad 等 OrCAD / Allegro 私有二进制文件的结构索引和安全退化预览。OrCAD / Allegro 文件格式公开资料有限,强行把 parser 混进 UI renderer 会让后续维护越来越难。本包把二进制检查和后续 WASM 内核边界固定下来,@file-viewer/renderer-eda 只负责展示。