Jump to content

BCJ (algorithm)

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by A bit iffy (talk | contribs) at 12:29, 28 November 2021 (+ short description). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In data compression, BCJ, short for Branch/Call/Jump, refers to a technique that improves the compression of machine code by replacing relative branch addresses with absolute ones. This allows a Lempel–Ziv compressor to identify duplicate targets and more efficiently encode them. On decompression, the inverse filter restores the original encoding. Different BCJ filters are used for different instruction sets, as each use different opcodes for branching.

A form of BCJ is seen in Microsoft's cabinet file format from 1996, which filters x86 CALL instructions for the LZX compressor.[1] The 7z and xz file formats implement BCJ for multiple architectures.[2] Delta update techniques like bsdiff and courgette also include a form of BCJ.[3]

References

  1. ^ "cabextract: Free Software for extracting Microsoft cabinet files". Retrieved 17 March 2020.
  2. ^ "The .xz File Format".
  3. ^ Colin Percival, Naive differences of executable code, http://www.daemonology.net/bsdiff/, 2003.