An effective method for electrocardiogram (ECG) compression is proposed. It is based on the pyramidal digital wavelet transform. The resulting wavelet coefficients are thresholded iteratively until a user-specified percentage root-mean-square difference is matched. In the next step, the nonzero coefficients of the thresholded vector are quantized adaptively by the linear quantizer of the lowest possible resolution. In the last step, the quantized wavelet coefficients vector is stored efficiently by a new proposed two-role encoder. The obtained results demonstrate clearly the method efficiency and the tradeoff rate-distortion is ensured successfully