»
Shrinking long sequences of identical bits: Compression uses a special
code to identify multiple copies of the same bits and replaces those copies
with just one copy, along with the number of times to repeat it. This option is
very effective with images (it works fine with fax black and white images) or
with any data that you can rearrange in order to group similar characters
together (DNA data is one of this kind).
»
Leveraging statistics: Compression encodes frequently used characters in a
shorter way. For example, the letter E appears commonly in English, so if the
letter E uses only 3 bits, rather than a full 8 bits, you save considerable space.
This is the strategy used by Huffman encoding, in which you recreate the
symbolic table and save space, on average, because common characters
are shorter.
Do'stlaringiz bilan baham: |