A Novel Adaptive Lossless Compression Algorithm for Efficient Medical Image Archiving and Transmission