The present general lossless compression algorithm is not effective for the compression effect of JPEG files. In this article, the lossless compression method combining the shuffling algorithm with the lossless compression algorithm and a new shuffling algorithm are proposed, and this new algorithm could compresses the JPEG files without losses, and the result indicates that this algorithm can further remove the redundancies in the files, and reduce the volume of the files, and the algorithm has been protected by the patent.