Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Re (tilly) 7: What data is code?

by clemburg (Curate)
on Nov 23, 2001 at 15:34 UTC ( [id://127096]=note: print w/replies, xml ) Need Help??


in reply to Re (tilly) 7: What data is code?
in thread What data is code?

(length(compress($text)) < 0.8*length($text))

Is the magic number "0.8" coming from intuition/experience/choice of an example?

Or do you have some reference or pointers for that threshold (not that I expect this in such an answer, it would just be nice to know where it comes from)?

Christian Lemburg
Brainbench MVP for Perl
http://www.brainbench.com

Replies are listed 'Best First'.
Re (tilly) 9: What data is code?
by tilly (Archbishop) on Nov 23, 2001 at 21:05 UTC
    Intuition.

    I just wanted to pick a number between what I expected to see with normal text and encrypted. Theoretically there should be no compression. Realistically people "encrypt" things with xor, and then you will be able to get some compression, just not very much.

    UPDATE
    Fixed typo that mkmcconn caught, and thinko that blakem pointed out.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-04-25 22:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found