Although most of the theoretical and implementation aspects of wavelet based algorithms in ElectroCardioGram (ECG) signal compression are well studied, many issues related to the choice of wavelet filters and threshold levels selection remain unresolved. The utilization of optimal mother wavelet will lead to localization and maximization of wavelet coefficients' values in wavelet domain. This paper presents an ECG compressor based on the optimal selection of wavelet filters and threshold levels in different subbands that achieve maximum data volume reduction while guaranteeing reconstruction quality. The proposed algorithm starts by segmenting the ECG signal into frames; where each frame is decomposed into m subbands through optimized wavelet filters. The resulting wavelet coefficients are threshold and those having absolute values below specified threshold levels in all subands are deleted and the remaining coefficients are appropriately encoded with a modified version of the run-length coding scheme. The threshold levels to use, before encoding, are adjusted in an optimum manner, until predefined compression ratio and signal quality are achieved. Extensive experimental tests were made by applying the algorithm to ECG records from the MIT-BIH Arrhythmia Database [1]. The compression ratio (CR), the percent root-mean-square difference (PRD) and the zero-mean percent root-mean-square difference (PRD1) measures are used for measuring the algorithm performance (high CR with excellent reconstruction quality). From the obtained results, it can be deduced that the performance of the optimized signal dependent wavelet outperforms that of Daubechies and Coiflet standard wavelets. However, the computational complexity of the proposed technique is the price paid for the improvement in the compression performance measures. Finally, it should be noted that the proposed method is flexible in controlling the quality of the reconstructed signals and the volume of the compressed signals by establishing target PRD and CR a priori respectively.