Reputation: 25
While the compression of plain text the size was reduced approx. 2 times but after encryption of the same text and compression the sizes where almost equal. Why the size of encrypted does not differ from origin text file?
Upvotes: 0
Views: 338
Reputation: 15685
Encryption is designed to make the encrypted data appear as a random stream of bytes. Random streams do not compress because they do not have any internal patterns for the compression algorithm to work on.
If you want both compression and encryption then always compress the plain data and then encrypt the compressed data.
Upvotes: 3