Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Re: More details on compressing a set of integers

by toma (Vicar)
on Jan 26, 2003 at 07:08 UTC ( [id://229953]=note: print w/replies, xml ) Need Help??


in reply to Re: More details on compressing a set of integers
in thread Compressing a set of integers

Sorry, I should have mentioned that I didn't mean to use the Base64 module, I was considering writing the numbers in base 64, so that when I run out of 0-9 I go through a-z then A-Z, etc, so I use more of the bits of the characters, and use fewer digits to represent the same number.

The penalty for compression on small strings is the dictionary that gets set up for the string. If I use a fixed dictionary, this shouldn't be a problem. So I need a customized version of the compression code.

With compression, I shouldn't need to use base 64, and I'm guessing that I will get about a 60% reduction in size.

Another optimization I thought of was to change the numbers to represent the differences between the numbers instead of the numbers themselves. So instead of

1,10,45,50,120
I would have
1,9,35,5,70

It should work perfectly the first time! - toma

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (6)
As of 2024-03-28 09:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found