← Back to context

Comment by gfody

13 years ago

It's not a good compression algorithm because the offset into pi will require more digits to represent than the data you are trying to compress in the first place. Quite a lot more considering the law of big numbers. So ultimately this algorithm is going to expand the size of your data by some enormous factor.

No, you just have to store the offset as well. And the offset for the offset. Then you just have to keep track of the number of offset cycles you've gone through - and you can store this as well.

Keep doing this until you have a number that is smaller than your file...

might take a while, but it would be very elegant.

  • considering the first offset is much, much larger than the file you started with. the offset to the offset is just going to increase in size with each iteration.