Smart meters play vital roles in the aspects of the management and operation of smart grids such as demand response, energy efficiency improvement, and electricity pricing. Massive amounts of data are being collected owing to the popularity of smart meters. Two main issues should be addressed in this context. One is the communication and storage of big data from smart meters at reduced cost. The other is the effective extraction of useful information from this massive dataset. In this paper, the K-SVD sparse representation technique, which includes two phases (dictionary learning and sparse coding), is used to decompose load profiles into linear combinations of several partial usage patterns (PUPs), which allows the smart meter data to be compressed and hidden electricity consumption patterns to be extracted. Then, a linear support vector machine (SVM) based method is used to classify the load profiles into two groups, residential customers and small and medium-sized enterprises (SMEs), based on the extracted patterns. Comprehensive comparisons with the results of k-means clustering, the discrete wavelet transform (DWT), principal component analysis (PCA), and piecewise aggregate approximation (PAA) are conducted on real datasets in Ireland. The results show that our proposed technique outperforms these methods in both compression ratio and classification accuracy.