Compression

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • idea's on compression

    6 answers - 563 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Hi all, just wondering if anybody has any idea's on compressing data
    that is somewhat predictable or in a somewhat seq order
    an example:
    as you can see most of the numbers above seem incremental to a point.
    33559 -3-5-9
    0222244555568 -0-2-4-5-6-8
    133 -1-3
    1227778899 -1-2-7-8-9
    0234579 -0-2-3-4-5-7-9
    0 -just zero
    so we have some kind of pattern that's somewhat predictable, what
    advantage could I take
    of this fact with compression?
    any takers
    Graham.
  • No.1 | | 573 bytes | |

    houston wrote:
    ) Hi all, just wondering if anybody has any idea's on compressing data
    ) that is somewhat predictable or in a somewhat seq order
    )
    ) an example:
    )
    )
    )

    <snip>

    ) advantage could I take
    ) of this fact with compression?

    Delta encoding. Encode the difference from the previous number:
    )

    As you can see, lower numbers occur a lot more than higher numbers in this
    series. You can take advantage of this by using some kind of entropy
    encoder, such as Huffman or Arithcoding.

    SaSW, Willem
  • No.2 | | 1687 bytes | |


    "houston" <housty@hotmail.co.ukwrote in message
    news:1157471474.606199.279630@
    Hi all, just wondering if anybody has any idea's on compressing data
    that is somewhat predictable or in a somewhat seq order

    an example:
    --

    as you can see most of the numbers above seem incremental to a point.

    33559 -3-5-9

    0222244555568 -0-2-4-5-6-8

    133 -1-3

    1227778899 -1-2-7-8-9

    0234579 -0-2-3-4-5-7-9

    0 -just zero

    so we have some kind of pattern that's somewhat predictable, what
    advantage could I take
    of this fact with compression?

    for simple to implement answers:

    different options are possible, depending on what you want. for example, if
    your output is ascii-text (each byte representing a number) then many
    options are possible (many of which could still produce valid ascii text).

    eg, exploiting simple RLE compression:

    0x000x1F, 0x20: as normal

    0x210x2A: 09
    0x2B0x33: 0099
    0x340x3D: 000999
    0x3E0x47: 00009999
    0x480x51: 0000099999
    0x520x5B: 000000999999
    0x5C0x65: 00000009999999
    0x660x6F: 0000000099999999
    0x700x79: 000000000999999999

    or (avoiding and non-alphanumeric chars):
    0x300x39 ('0''9'): 09
    0x410x4A ('A''J'): 0099
    0x4B0x54 ('K''T'): 000999
    0x610x6A ('a''j'): 00009999
    0x6B0x74 ('k''t'): 0000099999

    also possible (if ascii is not needed) is using a BCD like representation (4
    bits/digit):
    09: 09
    AF: repeat last value 27 times

    or such

    any takers
    Graham.

  • No.3 | | 710 bytes | |


    Willem wrote:
    houston wrote:
    ) Hi all, just wondering if anybody has any idea's on compressing data
    ) that is somewhat predictable or in a somewhat seq order
    )
    ) an example:
    )
    )
    )

    <snip>

    ) advantage could I take
    ) of this fact with compression?

    Delta encoding. Encode the difference from the previous number:
    )

    Hm Where is that kind of "encoding" useful? I guess it doesn't really
    "compress" the given input ?

    As you can see, lower numbers occur a lot more than higher numbers in this
    series. You can take advantage of this by using some kind of entropy
    encoder, such as Huffman or Arithcoding.
    --
    SaSW, Willem
  • No.4 | | 349 bytes | |

    Delta encoding. Encode the difference from the previous number:
    )

    Hm Where is that kind of "encoding" useful? I guess it doesn't really
    "compress" the given input ?

    If your source consists of 8bit values and the deltas can be represented by
    7bits, then you have indeed compressed the input.

    Andy

  • No.5 | | 512 bytes | |

    )Delta encoding. Encode the difference from the previous number:
    ))

    stdazi wrote:
    ) Hm Where is that kind of "encoding" useful? I guess it doesn't really
    ) "compress" the given input ?

    I've already given the answer to that, quoted below for your convenience:

    )As you can see, lower numbers occur a lot more than higher numbers in this
    )series. You can take advantage of this by using some kind of entropy
    )encoder, such as Huffman or Arithcoding.

    SaSW, Willem
  • No.6 | | 115 bytes | |

    thanks guy's never thought about the delta encoding! that's just what I
    was needing

Re: idea's on compression


max 4000 letters.
Your nickname that display:
In order to stop the spam: 5 + 4 =
QUESTION ON "Compression"

EMSDN.COM