针对基于位置服务系统中移动终端存储空间小、移动通信网带宽有限的特点,结合XML数据流的结构特点,提出一种XML数据流压缩技术XDSC(XML data stream compression),该算法以元素、属性及命名空间为压缩粒度,利用XML Schema生成元素/属性压缩字典,扫描数据流一遍完成数据压缩,不需要保存元素/属性压缩字典.实验表明,XDSC在数据压缩率上要优于直接采用GZIP压缩算法;数据流压缩时间也是LBS等嵌入式信息系统可以完全接受的.
Due to the limited storage space and mobile communication bandwidth in the location based services, a novel compression method XDSC (XML Data Stream Compression) is proposed to compress and decompress XML data stream. The algorithm is encoded/decoded by the element, attribute and namespace. The XML schema constructs the element/attribute code dictionary. The data compression is finished with the data stream scanned once and the code dictionary is not saved in process of compression. The experiment result shows that XDSC is better than GZIP in compression ratio,and the compression time is entirely acceptable by the LBS or other embedded information system.