in reply to Re: More details on compressing a set of integers
in thread Compressing a set of integers

Sorry, I should have mentioned that I didn't mean to use the Base64 module, I was considering writing the numbers in base 64, so that when I run out of 0-9 I go through a-z then A-Z, etc, so I use more of the bits of the characters, and use fewer digits to represent the same number.

The penalty for compression on small strings is the dictionary that gets set up for the string. If I use a fixed dictionary, this shouldn't be a problem. So I need a customized version of the compression code.

With compression, I shouldn't need to use base 64, and I'm guessing that I will get about a 60% reduction in size.

Another optimization I thought of was to change the numbers to represent the differences between the numbers instead of the numbers themselves. So instead of

1,10,45,50,120
I would have
1,9,35,5,70

It should work perfectly the first time! - toma