in reply to Internally compressing Perl data

Not sure if it will meet your needs in this case, but you might take a look at PDL. It uses more efficient internal structures for storing large arrays and has operators for working with them.