Explicit Goals & Capabilities
Allow the GitGalaxy regex engine to natively ingest and extract dependency graphs from compiled binaries, JARs, and raw datasets without requiring expensive, rigid decompilers (like Ghidra) or AST source code.
The Concept
Standard regex chokes on null bytes and machine code. We will build an intermediary "Text-Projection" bridge. When GitGalaxy encounters a binary file, it will not parse it directly. Instead, it will project the binary into a deterministic, highly-structured text stream, and run our standard regex extractors over that text.
Detailed Plan & Options to Consider
- The Dispatcher (prism.py injection): Implement a MIME/null-byte check on file ingestion. If a file is binary, route it to the
BinaryProjectionBridge.
- Pluggable Projection Handlers:
- Strings Handler: Replicates the Unix
strings utility. Strips unprintable machine code and outputs only contiguous readable characters (configurable for ASCII or EBCDIC).
- Hex-Grid Handler: Replicates
xxd. Converts unreadable bytes into a strict 2-character hexadecimal text grid.
- Disassembler Handler: A passthrough for modern bytecode (e.g., executing
javap -c for Java .class files and capturing the text stdout).
- Regex Re-routing: The resulting flat text is fed back into GitGalaxy's standard registry. This enables us to use our existing COBOL, Java, or C extractors to find database calls and dependencies directly inside the compiled binary text projection.
Explicit Goals & Capabilities
Allow the GitGalaxy regex engine to natively ingest and extract dependency graphs from compiled binaries, JARs, and raw datasets without requiring expensive, rigid decompilers (like Ghidra) or AST source code.
The Concept
Standard regex chokes on null bytes and machine code. We will build an intermediary "Text-Projection" bridge. When GitGalaxy encounters a binary file, it will not parse it directly. Instead, it will project the binary into a deterministic, highly-structured text stream, and run our standard regex extractors over that text.
Detailed Plan & Options to Consider
BinaryProjectionBridge.stringsutility. Strips unprintable machine code and outputs only contiguous readable characters (configurable for ASCII or EBCDIC).xxd. Converts unreadable bytes into a strict 2-character hexadecimal text grid.javap -cfor Java.classfiles and capturing the text stdout).