Data distribution service (DDS) is a middleware API standard from Object Management Group (OMG), which transfers data using a publisher-subscriber model. The number of distributed nodes deployed in today's DDS communication system can reach tens of thousands, thus improving the efficiency of the communication system is important. In this work we present a structured text encoding strategy based on prior dictionary. This compression method has considerable compression effect on structured text such as HTML. In our evaluation, the average data compression rate is reduced by 7.07%, and the average system latency is reduced by 8.61% comparing to Zlib.