Step 1 input value Ò, C + W is Ò ,? Has it been there before? ”No” new dictionary becomes 156 [Ò,?] then the output is Ò so on until there is still the next character in the Stream character:
Stream characters: “Ò?PfÑ@ÆF”
Total initial bits are stored before compression =
Total Input * bit dictionary
= 8 * 8
= 64
After compressed = Total Output * bit dictionary
= 7 * 8
= 56
Ratio = \(\left(\frac{\text{Compressed\ file\ size}}{\mathrm{\text{Original\ Size}}}\right)\) X 100 %
=100 - \(\left(\frac{56}{64}\right)\) X 100 %
= 100 - 87.5 % = 12.5%
Based on the formula above the compression ratio is 12.5%, it appears that the compression ratio are not too big, one of the weaknesses of the LZW algorithm is the smaller a string that recognized from the dictionary then the compression process is also low, so the LZW algorithm is either used for long strings or has a pattern looping often the case so that the compression process is also significant, here is a comparison of compression graphics to ciphertext Blowfish with different length.