In the modern hospital, the efficient storage of electronically recorded biomedical signals as well as its transmission over communication networks is becoming more and more important. Although digital storage media is currently almost inexpensive and computational power has exponentially increased in last years, effective electrocardiogram (ECG) compression techniques are still very attractive. In fact, several millions of electrocardiograms are recorded annually and the transfer of electrocardiogram records over communication networks for remote analysis is now done more than ever. Besides the increased storage capacity for archival purposes, ECG compression allows real-time transmission over communication networks, economic off-line transmission to remote interpretation sites and enables efficient ECG rhythm analysis algorithms. In this paper, an adaptive approach to ECG compression is proposed, which provides comparable results with various types of ECG signal, namely normal sinus rhythm, ventricular tachycardia and ventricular fibrillation. Most proposals in the literature approach the problem of ECG compression without considering the possibility of such pathologies and, consequently, their performance deteriorate in cases where such signals are present. Experimental results of the proposed algorithm are promising, although compression ratios are still not yet as good as they can get.