Image compression is done using the Discrete Cosine Transform.
DCT algorithm is a lossy compression technique used in JPEG compression.
Quantization is achieved by using the Luminance matrix.
Further encoding of data is done by using Huffman coding.