According to information theory, a real random string can not be compressed. So I think there is a random string generating method which is compress a document until its size decreasing proportion fall into a custom range, then get its 0,1 bits string and this string is very close to real random, like a series coin flap. Another coding is also possible, but difficult. For example, generate random string of English alphabet. We can do this by compress this document until custom condition is satisfied, but how to convert 0, 1 back is a problem, even each character's entropy can not be all integer, so there is no way to design its precise coding (that is, 2^n=26, n can't be a integer, so the convertion is not uniform). Using Hoffman coding will lead result has a considerable distance. So this method only apply to 0,1 bits string generating.