An Efficient Data Compression Approach to the Classification Task