I want to compress the string 0cc175b9c0f1b6a831c399e269772661. I can do so by storing the string a, and, when decompressing, using a as input for the MD5 hash algorithm to get the original string.
I realize it's impossible to represent $2^{128}$ possible strings with inputs less than 128 bits long, even if MD5 had no collisions. However, a percentage of 128 bit strings could still be compressed using this concept.
Maybe another hash algorithm could be made with this application in mind. It does not need to be secure, irreversible, or computationally difficult. It just needs to represent the largest number of output strings given a string who's length is smaller than the output.
Multiple hashing algorithms could be used to increase the number of possible strings that could be compressed.
Is this idea practical? Could this idea be applied to compress large chunks of arbitrary data such as a file?