Data Compression vs Data Encryption
Data compression is the process of reducing the size of data. It uses an encoding scheme, which encodes the data using a less number of bits than the original data. Encryption is also a process of transforming data that is used in cryptography. It converts the original data in to a format that can only be understood by a party that possesses a special piece of information (called a key). The goal of encryption is to keep information hidden from parties who do not have permission to view the information.
What is Data Compression?
Data compression is a method of transforming data with the intension of reducing its size. This is useful because it allows saving resources like storage space and bandwidth (when transferring data). It uses an encoding method that will reduce the amount of bits used to store the data than the original representation. When using compressed data, they need to be decompressed first. When designing a data compression scheme, one has to consider important factors such as the level of compression required, amount of distortion introduced by the compression scheme and the computational and hardware resources required to compress and decompress data. Especially, when it comes video decompression, special hardware will be required to decompress the stream fast enough so that the viewing is not disturbed. With video, decompressing before hand would not be an option since it will require a large storage space.
What is Data Encryption?
Encryption is a method of transforming data with the intension of keeping it a secret. Encryption uses an algorithm called a cipher to encrypt data and it can be decrypted only using a special key. Encrypted information is known as ciphertext and the process of obtaining the original information (plaintext) from the ciphertext is known as decryption. Encryption is specially required when communicating over an untrusted medium such as internet, where information needs to be protected from other third parties. Modern encryption methods focus on developing encryption algorithms (ciphers) that are hard to break by an adversary due to the computational hardness (therefore could not be broken by a practical means). Two of the widely used encryption methods are Symmetric key encryption and Public-key encryption. In Symmetric key encryption, both the sender and the receiver share the same key used to encrypt the data. In Public-key encryption, two different but mathematically related keys are used.
What is the difference between Data Compression and Data Encryption?
Even though both data compression and encryption are methods that transform data in to a different format, the golas tried to achieve by them are different. Data compression is done with the intension of decreasing the size of data, while encryption is done to keep the data secret from third parties. Encrypted data cannot be decrypted easily. It requires the possession of a special piece of information called a key. Uncompressing compressed data do not require such special knowledge (such as a key), but it might require some special hardware depending on the data type.