COMPRESSION TECHNIQUES 1. INTRODUCTION - There are many different compression techniques, and they will be deployed in different situation depending on the nature of the data . - A compression ratio gives an indication of the success of a compression method in reducing size. It is calculated by dividing the size of the original file. DIFFERENT COMPRESSION TECHNIQUES 1. LOSSY COMPRESSION - Lossy compression is a term used to describe compression techniques that result to loss of data. - That is data is permanently removed from the file. When decompressed, the data that was removed types of file, is recreated from the data that remains in the file. The re-created data will almost certainly not be the same as the original data. Instead, it will be an approximation of the original data. - This may seeem a very strange concept, but for many types of files and approximation of data is good enough. - Many of the sound and image file formats uses lossy compression ; for example JPEG and MP3 are both lossy formats SOME LOSSY COMPRESSION ALGORITHM I. JPEG : DCT-Based image coding standard 1 JPEG enables a compression technique which is able to do compressing continous-tone image or data along with pixel having depth of 6 to 24 bits with the enough efficiency and speed. A Discrete Cosine Transform (DCT) describes a fixed series of the data points in the terms of sum of the cosine function fluctuate at various frequencies DCTs are vital for various implementations in science and in the engineering area, from the lossy compression of audio for example MP3 and images like JPEG. By using the cosine instead of a the sine function it is complicated in the implementations for the compression which it returns found that the cosine function is so much effective as mentioned here, some functions are required to the exact a typical signal, while for the specific selection of the boundary condition. JPEG image compression performs in the part through rounding off the non essential bits of the information. Here the is a relationship between the information loss and the reductionof size. Various number of the famouscompression techniques have achieved these intuitive differences, consist of those that are used in the music files, video and images. 2 DCT fragment the iùage into the parts of separate frequencies in which less significant frequencies are cancelled through the quantization process and more significant frequencies are used for retrieving the image while the process of decompression . II. Image Compression by Walvelet Transform - For various signals the technique of wavelet transform is very efficient tool as compare to the fourrier transform technique. The technique of wavelet transformed enables the multi-resolution represented by the use of the set of analyzing functions or wavelets. - The technique of wavelet transform found in various forms. - These tranform can be represented in the figure below 3 III. ADVANTAGES AND DISADVANTAGES OF LOSSY -Advantages : - very small file size and lots of tools, plugins and softwares support it. -Disadvantages : - Quality degrades with higer ratio of compression cannot get original after compression LOSSLESS COMPRESSION - Lossless compression refers to techniques where no data is lost in the compression process . - When the file is decompressed, the contents are identical to the original file(before it was compressed). - Lossless compression is appropriate when data cannot be approximated. If you produce an assignment and email it to a teacher, it is important that when the file is opened it is exaclty the same as the original. - When a file is saved, compression is applied automatically to reduce the file size. When the file is opened, the data is recreated so that it can be viewed and worked with. - When you save a piece of work, you rely on the software to store the data in the most appropriate form . There are two types of lossless techniques : - run length encoding - (RLE) and Dictionary-Based method 4 IV. Run length Encoding (RLE) - This is a lossless compression technique. It works by finding ‘runs’ of repeated binary patterns and replacing them with a single instance of the pattern and a number that specifies how many times the pattern is repeated. - If and image of image size 28 pixel x 28 pixel and it uses 5 Colours. So 3 bits are needed to define 5 colour code (23=8). - The colour palettte is as follows ; CODE 000 001 010 011 100 101 110 111 COLOR White Pink Blue Magenta Navy unused Unused unused 5 NB: 1. Usually, runs are not processed row by row ; there may be long runs that span several rows 2. The data does not have to be image data. However, this technique is well suited to image data , especially files with smaller colour palettes, as these images often have repeated blocks of colour 3. In most RLE schemes, the run is typically encoded into two bytes ; one byte for the pattern and one byte for the number of repetitions in a run 4. RLE will only achieve significant reductions in file size if ther are long runs of data. In the extreme case of being no repeated patterns, the file size could be double that of the original size. V. Dictionary Based method This compresssion method also relies on finding pattern in data. However, it does not look for repeated runs of characters, as the repetitions do not need to be adjacent to each other, Instead of storing the pattern itself, a shorter code is substituted. 6 VI. ADVANTAGES AND DISADVANTAGES -Advantages : no loss of quality slight decrease in image file size -Disadvantages : Larger file than if you were using lossy compress SOME SUMMARY S/N Lossless data compression Lossy data compression 1 In lossless data compression there is no lost of any data and quality There is lost of data and quality which is not measurable 2 The file is restored in it original form The file is not restored in it original form 3 It is mainly used to compress text, sound and images Mainly used to compress audio video and images 4 It holds more data It hold less data 5 High quality file data File quality is low 6 It supports RAW,BMP,PNG Lossly support GPEP,GIP and MP3 MP4 7 8 CONCLUSION There are many compression techniques under the lossly and lossless method that are used inorder to compress data. Each method is used inorder to optimise the compression technique. 9