Branch/Call/Jump filter for big-endian PowerPC machine code. Detects B/BL (Branch, Branch with Link) instructions, identified by opcode 18 with the absolute-address bit clear, and rewrites their word-aligned 24-bit relative offset into an absolute byte address so repeated branches to the same target produce identical byte sequences.
| Property | Value |
|---|---|
| Category | Compression Algorithms |
| Sub-category | Transform |
| Security status | Not classified |
| Complexity | Intermediate |
| Inventor | Igor Pavlov |
| Year | 2003 |
| Origin | 🇷🇺 Russia |
| Source | algorithms/compression/bcj-powerpc.js |
Status: not classified — treat as unverified.
No vulnerabilities are recorded for this implementation.
2 vectors ship with this algorithm and run in the test suite. Byte values are hexadecimal.
Vector 1 — Empty buffer
| Field | Value |
|---|---|
input |
(empty) |
expected |
(empty) |
Vector 2 — Two consecutive B/BL instructions (big-endian words, opcode 18)
| Field | Value |
|---|---|
input |
4800000148001001 |
expected |
4800000148001005 |