Decoding a compressed short string; uncertain on compression used - Updated
Posted
by James
on Stack Overflow
See other posts from Stack Overflow
or by James
Published on 2010-02-22T15:29:02Z
Indexed on
2010/03/18
16:21 UTC
Read the original article
Hit count: 440
Hi, I have a program that is compressing a string in an unknown way. I know a few inputs and the output produced, but I am not sure what is being used to compress the string.
Here are my examples.
(just 38 x a, no spaces or anything else)
In: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
Out: "026900211AA63000026900"
(just 32 x a)
In: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
Out: "0209001c1aa7a000020900"
(31 x a, then 1 b)
In: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab"
Out: "0209000177c553c000020900"
(31 x b, then 1 a)
In: "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbba"
Out: "0209001e7754f38000020900"
In: "Hey wot u doing 2day u wanna do something"
Out: "02990011C7C62E78CE6B8E3ACD83E81B37C5C5A6B9D1E1B06963DB5E71155C1000029900"
(same as previous string, but with a space at the end)
In: "Hey wot u doing 2day u wanna do something "
Out: "02A90012C7718B9E339AE2EB360FA02CDF17177A674786DF4B1EDAF388AAE08000000002A90000"
The only definite thing I can see so far is digit 2 and 3 are the amount of characters (hex value), ie first one is 26 = 38
Also the first 6 digits are repeated at the end
Any help / advice would be great, thanks!
© Stack Overflow or respective owner