I was considering compression using primes as well, but I was going to convert the entire file into a Prime(x) + k. I was having trouble because you would need to know the ordinal of primes from 2 to 256^filesize_in_bytes. This is a very high limit for normal size files. The 10^12th prime is 29,996,224,275,833 which fits in 6 bytes. Instead of 29996224275833 in six bytes I would say 1000000000000 which takes 5 bytes. Ideally for a 128 byte file instead of a value between 256^(128) and 256^(128 +1) -1 I would use the Nth prime which would be somewhere around 2.55635×10^305 which fits in 127 bytes, but the offset k my take up the rest of my space if it is more than 255.To find this nth prime I would need to evaluate all primes from 29996224275833 up until the value was larger than the value of the file tracking the ordinal of those primes. This is infeasible. The Nth prime is estimated as Nln(N) so the real prime near NLog(N) could be stored as N, but it is not much compression. The real problem is finding the mapping of Prime to N for large enough Prime that it is helpful.