- The authors introduce a new ECG compression algorithm, and a new distortion measure. The distortion measure, called the Weighted Diagnostic Distortion (WDD), is based on comparing PQRST complex features (such as: RR interval, QT interval, ST elevation, etc.) of the original ECG signal and the reconstructed one. The compression algorithm is based on analysis by synthesis coding. It consists of a beat codebook, long and short term predictors, and an adaptive residual quantizer. The compression algorithm uses the WDD measure in order to encode, by means of analysis by synthesis, every beat of the original ECG signal. The compression algorithm has been applied to the MIT-BIH Arrhythmia Database. A rate of approximately 100 bits per second has been achieved with a very good quality (WDD below 4%, and PRD below 8%).