In long-term electrocardiogram (ECG) recording for arrhythmia monitoring, using a uniform compression strategy throughout the entire data to achieve high compression efficiency may result in unacceptable distortion of abnormal beats. The presented work addressed a solution to this problem, rarely discussed in published research. A support vector machine (SVM)-based binary classifier was implemented to identify the abnormal beats, achieving a classifier sensitivity (SE) and negative predictive value (NPV) of 99.89% and 0.003%, respectively with 34 records from MIT-BIH Arrhythmia database (mitdb). A hybrid lossy compression technique was implemented to ensure on-demand quality, either in terms of distortion or compression ratio (CR) of ECG data. A wavelet-based compression for the abnormal beats was implemented, while the consecutive normal beats were compressed in groups using a hybrid encoder, employing a combination of wavelet and principal component analysis. Finally, a neural network-based intelligent model was used, which was offline tuned by a particle swarm optimization (PSO) technique, to allocate optimal quantization level of transform domain coefficients generated from the hybrid encoder. The proposed technique was evaluated with four types of morphology tags, 'A,' 'F,' 'L,' and 'V,' from mitdb database, achieving less than 2% PRDN and less than 1% in two diagnostic distortion measures for abnormal beats. Overall, an average CR of 19.78 and PRDN of 3.34% was obtained. A useful outcome of the proposed technique is the low reconstruction time in rapid screening of long arrhythmia records, while only abnormal beats are presented for evaluation. © 1963-2012 IEEE.