Compression of biomedical signals is of great interest in telemedicine applications for a fast and reliable online data transfer. In this paper, an adaptive method for compression of respiratory and swallowing sounds is proposed. The method is based on the transform coding of the signal and adaptively assigns two different bit allocations for encoding the stationary and non-stationary parts of the signal. The method was applied to data of 12 subjects and its performance was compared with other methods of bit allocation such as constant bit allocation. The results show that the proposed adaptive bit allocation method improves the SNR of the signal by 3 dB compared to that of constant bit allocation method. Furthermore, the possibility of removing the requirement of updating the bit allocation method for each subject was investigated. The results confirm that with a few training data, the proposed method can be used in a fully automated mode without the need to adjust the adaptive bit allocation for every signal separately; hence, it is faster for online coding applications.