Now an N bit-vector can represent
2^N possible states. It is possible with fore knowledge to assign each state to a single valid document of any length. In this sense there is no lossyness, all valid documents can be clearly communicated in the smallest amount of space. There is no encoding scheme that can squeeze any more meaning into a N bit vector. Whatever the length that you peg that vector at dictates how many valid documents you can get. This is a fundamental property of Entropy. I highly recommend reading Claude Shannon's paper on Information Theory. It will take some time to digest.
But to your question. Can you somehow drop half (more or less) of the bits in the compressed representation and still extract the document? Yes, and No.
Lets say that
K bits were dropped from the message. This is the same as saying that there was noise during communication that obscured the state of those bits. Given only the bits that you received, can you discover the original message?
If this message was perfectly compressed, those missing bits introduced
(2^K)-1 other valid documents. These documents are equally valid, and equally expected as the intended document. The receiver can only generate each possibility and say "One of these".
Now that does not mean that the receiver is completely confused. If all of the possible documents have the same property, say the titles are identical, or the timestamps agree on the date etc... Then the receiver can act on that information. On the other-hand, the receiver will need to be more cautious about contradictory properties, and about the validity of an action given the uncertainty in the message.
It would be nice if the receiver could dismiss all the
(2^K)-1 documents and recover the one true message. But for this to happen the compression scheme has to be less than perfect. Essentially we have introduced at least
(2^K)-1 invalid states into the compressed output. This is actually the basis for Self-Healing codes, error mitigating codes, and error detecting codes. I'm not going to go into specifics about how these encodings work on a bit by bit level but think of them as levels of protection.
- An error detecting code like a hash, or cyclic-redundancy checksum (CRC) allows the receiver to verify that everything was received as sent to some level of confidence
1 / (2^(C+N)) bits where
C are the number of bits in the hash/crc. They may also provide some limited diagnostics as to what went wrong. And paired with an exploration of the bit space suggest potentially valid documents.
- An error mitigating code like a grey-code, is assembled in such a way that an error in some
K bits only changes the meaning of the message by at most
(+/-)cK values off (
c being a constant). These are best with continuous values such as frequencies for music, or degrees of rotation or temperature where being a little off is not a serious issue.
- An error correcting code allows the exact valid document to be recovered when anywhere up to
K error bits have occurred. Past that
K bits though it devolves into an error detecting/mitigating code.
Regeneration with just a Hash
In this case the hash is serving as an error detecting code. Unfortunately all
N bits of the message have been lost. It is possible to enumerate all bit sequences from
n..N bits long, and either compute their hash to verify their validity, or construct the enumerator such that it can only produce valid bit sequences algorithmically. The receiver would need to guess the range of
n..N such that the valid message was generated.
n..N bit range might be assisted by encoding the length somehow in the hash. Allowing somehow to prove that messages with less than
n bits or more than
N bits will always be invalid. This will make the Hash function much poorer as a hash of the contents, as it will focus more on a documents length. This will allow the generator to target a specific
n..N bit range, but at the cost of recognising more of those bit vectors as valid documents.
Notice though that for this to work as a true compression algorithm, the hash could never have a collision with another valid document. That means there is one unique hash state for each valid document. Which makes the hash the compressed document, just a very hard to decode document. Unfortunately a Hash without collisions is hard to engineer, and usually requires more bits than the original message, making it more of a diffusion than a compression technique. Conversely if collisions are allowed the Hash devolves back toward error mitigating, or error checking depending on how close the valid documents are in terms of meaning.
So Yes, you can send a hash through and the receiver can extract the original message, at great expense of effort.
But No the receiver will also receive a lot of other unintended messages too.