Since you brought it up, I wonder if encryption and compression aren't both instances of a common mathematical phenomena. They seem very similar to each other.
No. You can have a general purpose encryption algorithm , but not a general compression algorithm. Encryption generally requires increasing data size. Compression requires decreasing data size and is not possible in the general case.