Implemented the message compression process

Wrapped the domain name convert process, hope it'll be cleaner.