Reposting again for truth.
You have no idea how stupid that is. Turing's corpse just blew dehydrated flecks of cyanide-laced apple skin into the moldy remains of his nasal cavity.
This only works if you can iterate within the typical set of the target domain.
The minimum fully distinguished hash length for a truly random input string is the same size as the input string, plus an anti-collision pad of about 16 bytes (ambiguous cases reduced to one part in 2^128).
What you've actually described is a data inflation method.
Crank score 10/10.
———
Extra explanation for round two.
We typically use hash functions to map items from a fluffy set of typical input strings. For example, English sentences. They are "fluffy" because they are encoded much longer than the underlying entropy of the typical set.
A hash function loosely creates a 1:1 map between members of your fluffy set and your densely encoded set (hash keys), where the length of the hash key in bits is approximately log2(fluffball).
So if you had a fluffball set of 2^800,000,000 possible values that English Wikipedia could have been over reasonable alternative histories, your algorithm will map the hash value back to the unique member of this fluffball that our actual Wikipedia contains.
But we don't have a fluffball of 2^800,000,000 possible values that English Wikipedia could reasonably have otherwise been. That's a rather large counterfactual space to tuck into your back pocket, and makes the compression challenge look rather minor by comparison.
When you iterate of a set of densely encoded random input strings, your input space is indistinguishable from your hash space. When you see a string that looks like it might have come from Wikipedia, you'll have to then ask: are you showing me a string from the hash space or the input string space? Depending on the size of your hash pad inflation, these are not too far apart.
Hashing is not a magic form of compression. It's a way of mapping a chosen set of fluffy encodings onto dense encodings.
Usually the chosen fluffy set is constructed as "all inputs I actually see in the first one trillion years of runtime". Then you set your stored hash length to log2(trillion_year_cardinality) + paranoia_pad, where the pad is usually bounded in practice somewhere between 4 and 20 bytes (or none at all, or slightly less than none, if you algorithm fall through to a second-level verification).
Admittedly, it's a bit weird to delegate your chosen set into the future like that, but it works because hashing references back onto observed history, because it functions at the bookkeeping layer.
I actually once implemented a hash table where the pad was slightly less than none because it was a pure speedup, and it was more effective to filter out only the annoying extra collisions in the next step (we did in fact run through the input space exhaustively to determine all collisions, then classified the collisions as irrelevant or annoying, and then created a tiny supplementary data structure to only subtract the annoying ones). Our hash table ended up with rather many "phantoms" as a result: completely ridiculous answers generated from spurious collisions pertaining to questions no-one would feasibly ever ask.
We actually considered it an advantage that our data structure effectively contained a vast number of trap streets.
It made our software hard to copy, because our hash function was contained in an Israeli-made hardware dongle which only we could source. Or you could rebuild our data structure with a different hash function, including all the phantoms, at 50x the original data size. (Not all that viable in the 640 KiB days of yore.) Of course, you could eliminate the phantoms if you had the same linguistics expertise we had, to determine which questions could be reasonably asked, and which ones could not. But possessing such a typical set is not cheap. See above.
Sometimes these hardware dongles could be reverse engineered, but that takes real talent, and real talent costs real money. As evidenced by some of the answers on this forum thread which are cynanide snortable.