This paper proposed a fingerprint compression based on sparse representation. The proposed method has the ability by updating the dictionary. The specific process is as follows: construct a base matrix whose columns represent features of the fingerprint images, referring the matrix dictionary whose columns are called atoms; for a given whole fingerprint, divide it into small blocks called patches whose number of pixels are equal to the dimension of the atoms; use the method of sparse representation to obtain the coefficients; then, quantize the coefficients; last, encode the coefficients and other related information using lossless coding methods. The experiments demonstrate that our algorithm is efficient compared with several competing compression techniques especially at high compression ratios.