Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re^4: Data compression by 50% + : is it possible?

by LanX (Archbishop)
on May 12, 2019 at 12:32 UTC ( #1233641=note: print w/replies, xml ) Need Help??

in reply to Re^3: Data compression by 50% + : is it possible?
in thread Data compression by 50% + : is it possible?

>  using a single character to encode each group (@c) into a character, so it would use 9 characters (72) bits

Oh I see, but I hope you are aware that your approach can easily be packed into 9*6=54 bits and is easier to code than mine.

With a per line ratio of 7 bytes = 56 bits you'll already have a 50%+ compression.

My approach would require modulo 50 calculations on 51 bit integers, not sure how tricky this is on a 32 bit machine.

So I'd rather "waste" 5 bits/line for a pragmatic solution.

Btw: I'm reluctant trying to implement Huffman here, because the OP could probably change the parameters in his next post.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

  • Comment on Re^4: Data compression by 50% + : is it possible?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1233641]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2019-06-19 00:44 GMT
Find Nodes?
    Voting Booth?
    Is there a future for codeless software?

    Results (83 votes). Check out past polls.

    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!