With really, really huge (like the aforementioned 7GB) numbers, you might see something better, sort of how there's a point with most compression methods that the header is bigger than the data being compressed.
Kinda doubting it now, though.
With really, really huge (like the aforementioned 7GB) numbers, you might see something better, sort of how there's a point with most compression methods that the header is bigger than the data being compressed.
Kinda doubting it now, though.
This times out quickly if you use too big of a number, but you can play around with integers here: http://codepad.org/4mnHI9E3
Based on what I see, it compresses poorly at the beginning and then reaches parity. At 1,000,000 (tested on my machine, not Codepad since it times out), you get one bit of profit, but 1,000,005 is at parity, suggesting that it's not very stable.
Also, this is assuming that the decompressor can make sense of the absolute smallest representation you could lay out these numbers with, which is basically not going to happen. That additional padding would destroy any potential savings you got.
The current largest prime is (2^57885161)-1, which is 17,425,170 digits, yet can be represented with much less, obviously.
Maybe adding exponents would help. aX^n + b, perhaps?