One classic transformation for executable code is to convert memory offsets to absolute addresses for compression. Absolute addresses are more compressible than relative ones.
Probably the single oldest trick in the code compression book.
One classic transformation for executable code is to convert memory offsets to absolute addresses for compression. Absolute addresses are more compressible than relative ones.
Probably the single oldest trick in the code compression book.
Isn’t it the other way around? Absolute addresses are all different while relatives often repeat, leading to better compression.
In sane code, there are more function calls than there are functions. Imagine, now, that there's a function at 0x1337, and it's called from 69 different places in the code.
If we're using relative addresses, this would, of course, result in 69 different addresses to compress - each relative address being the difference between 0x1337 and the position of the code that calls it.
If we're using absolute addresses, we get the same exact address 0x1337 repeated 69 times - which is way more compressor friendly.