Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re^2: Perl script compressor

by shmem (Chancellor)
on Dec 08, 2019 at 18:08 UTC ( #11109844=note: print w/replies, xml ) Need Help??

in reply to Re: Perl script compressor
in thread Perl script compressor

Or did I miss something?

Probably. Many Javascript blurbs are delivered either as foo.js or foo-minimal.js, so that might be some "State Of The Art" thing. Or code obfuscation for *cough* EULA reasons. Or some such.

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

Replies are listed 'Best First'.
Re^3: Perl script compressor
by haukex (Chancellor) on Dec 08, 2019 at 22:25 UTC
    Many Javascript blurbs are delivered either as foo.js or foo-minimal.js

    True, but I'm pretty sure JS can be parsed with a static parse, and so a reduction like that is safer than with Perl.

      That's mostly because JS is downloaded by the client on each request, so there's real network savings by minimizing the amount of data coming across the wire.

      That's a much different reason than simply reading a server-side script directly from disk.

        "That's mostly because JS is downloaded by the client on each request"

        You may want to switch on your browsers developer tools, head to the network tab and observe exactly the opposite, the browser not download the same JS file on each request.

        If you don‘t believe what marto said make this experiment: Install some http debugging proxy like fiddler. Go to some website that uses JS (almost every today) and examine the traffic. You will understand why some web developers sometimes behave strange. Regards, Karl

        «The Crux of the Biscuit is the Apostrophe»

        perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2020-06-02 04:46 GMT
Find Nodes?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?

    Results (13 votes). Check out past polls.