As long as you have more than one legitimate codeword, there is no way to ensure error-free transmission since there exists an error vector that will convert the transmitted codeword into another legitimately codeword that the receiver will accept.Once encoded, there are plenty of ways to ensure error free transmission in as few bits as possible.
This depends on the data. There are plenty of data sources that allow extreme compression using even simple compression techniques provided the technique is designed for that type of data. But for every compression algorithm there exists data that, when compressed, will result in the compressed bitstream being longer than the original. The more random the data is, the less compression you can achieve and you can't get any meaningful compression on data that has been well encrypted prior to compression (if you can compress it prior to encryption, that a different matter, but that's not always possible, once again, it depends on the data).I've done similar back in the 90s to essentially allow a nearly 1 Mbit transmission rate on a 115kbaud channel.