Constrained ECG compression algorithm using the block-based discrete cosine transform