The physical markup language (PML) is designed to be a general, standard means for describing the physical world including human and machines. it will be widely used in future EPC (electronic product code) network based on internet of things. how to save PML document in internet server efficiently will become more and more important. this paper proposes a compression method based on huffman coding according to the format PML dara. the algorithm and java code pieces are presented. and the test result shows the compression method has good compression ratio for the PML document. possible improvements in the future are also discussed.