Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #26930 > unrolled thread

12 JavaScript Packers In 1 - Compress, Obfuscate & Minify

Started byChris White <0ntariokingston@gmail.com>
First post2015-02-25 09:50 -0800
Last post2015-03-08 19:32 -0700
Articles 11 — 4 participants

Back to article view | Back to comp.lang.javascript


Contents

  12 JavaScript Packers In 1 - Compress, Obfuscate & Minify Chris White <0ntariokingston@gmail.com> - 2015-02-25 09:50 -0800
    Re: 12 JavaScript Packers In 1 - Compress, Obfuscate & Minify "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2015-02-25 11:40 -0800
      Re: 12 JavaScript Packers In 1 - Compress, Obfuscate & Minify Chris White <0ntariokingston@gmail.com> - 2015-02-25 12:47 -0800
    Re: 12 JavaScript Packers In 1 - Compress, Obfuscate & Minify "Chris White AKA Dave Brown AKA WHAK.com" <0ntariokingston@gmail.com> - 2015-03-03 17:33 -0800
    Re: 12 JavaScript Packers In 1 - Compress, Obfuscate & Minify "Chris White AKA Dave Brown AKA WHAK.com" <0ntariokingston@gmail.com> - 2015-03-07 12:45 -0800
    Re: 12 JavaScript Packers In 1 - Compress, Obfuscate & Minify Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-03-08 10:01 +0100
      Re: 12 JavaScript Packers In 1 - Compress, Obfuscate & Minify "Chris White AKA Dave Brown AKA WHAK.com" <0ntariokingston@gmail.com> - 2015-03-08 18:34 -0700
        Re: 12 JavaScript Packers In 1 - Compress, Obfuscate & Minify Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-03-09 03:08 +0100
    Re: 12 JavaScript Packers In 1 - Compress, Obfuscate & Minify "Chris White AKA Dave Brown AKA WHAK.com" <0ntariokingston@gmail.com> - 2015-03-08 08:42 -0700
    Re: 12 JavaScript Packers In 1 - Compress, Obfuscate & Minify "Chris White AKA Dave Brown AKA WHAK.com" <0ntariokingston@gmail.com> - 2015-03-08 08:43 -0700
    Re: 12 JavaScript Packers In 1 - Compress, Obfuscate & Minify "Chris White AKA Dave Brown AKA WHAK.com" <0ntariokingston@gmail.com> - 2015-03-08 19:32 -0700

#26930 — 12 JavaScript Packers In 1 - Compress, Obfuscate & Minify

FromChris White <0ntariokingston@gmail.com>
Date2015-02-25 09:50 -0800
Subject12 JavaScript Packers In 1 - Compress, Obfuscate & Minify
Message-ID<a9fe284f-6fd6-4d60-b127-dfe7ccc7e621@googlegroups.com>
http://www.scriptcompress.com/JavaScript-Packers.htm is a web
application I made (download if you wish, it's all embedded, a stand
alone portable page) that will pack up Text, HTML or JavaScript 
to a self extracting & auto running web page archive in JavaScript. 
I am getting close to beating server side compression ratios, 
already with this page you can make a web page smaller than a self 
extracting zip archive made with WinZip or 7zip. Then by conver
ting say this page to an SVG image (make open a popup window so 
it works in Microsoft Internet Explorer,  like 
http://imgh.us/NIV-Holy-Bible.svgz 
where a 5MB app is compressed to 1.4MB) and then 
Gzip it and rename *.svgz and you will actually beat any server 
side compression!

Possible benefits:
-Some companies have to spend extra money on 
servers to handle extra CPU processes like having 
to decompress a file to a client that is "stupid".
-Host large web apps on free hosting (or even free image hosting as 
shown above) like blogs and forums, or even sites that allow you to
customize the look and feel of site like my demo: 
http://scriptcompress.master.com
-Client side compression just makes it so you can com-
press almost anything.
-Large scale websites can save more money 
with data transfers.
-WHAK, WHAM, POW (& couple others) Unpackers
 are so simple (just search & replace), less CPU usage, around 80
 bytes of coding to extract!

This is a work in progress. I am re-
inventing the wheel here, I almost got it rounded out ;)

See some of my other demos & tools on 
http://www.scriptcompress.com

[toc] | [next] | [standalone]


#26931

From"Michael Haufe (TNO)" <tno@thenewobjective.com>
Date2015-02-25 11:40 -0800
Message-ID<e63b53a7-c2d4-4fec-9d48-759b74aa8fab@googlegroups.com>
In reply to#26930
On Wednesday, February 25, 2015 at 11:50:43 AM UTC-6, Chris White wrote:
> http://www.scriptcompress.com/JavaScript-Packers.htm is a web
> application I made (download if you wish, it's all embedded, a stand
> alone portable page) that will pack up Text, HTML or JavaScript 
> to a self extracting & auto running web page archive in JavaScript. 
> I am getting close to beating server side compression ratios, 
> already with this page you can make a web page smaller than a self 
> extracting zip archive made with WinZip or 7zip. Then by conver
> ting say this page to an SVG image (make open a popup window so 
> it works in Microsoft Internet Explorer,  like 
> http://imgh.us/NIV-Holy-Bible.svgz 
> where a 5MB app is compressed to 1.4MB) and then 
> Gzip it and rename *.svgz and you will actually beat any server 
> side compression!
> 
> Possible benefits:
> -Some companies have to spend extra money on 
> servers to handle extra CPU processes like having 
> to decompress a file to a client that is "stupid".
> -Host large web apps on free hosting (or even free image hosting as 
> shown above) like blogs and forums, or even sites that allow you to
> customize the look and feel of site like my demo: 
> http://scriptcompress.master.com
> -Client side compression just makes it so you can com-
> press almost anything.
> -Large scale websites can save more money 
> with data transfers.
> -WHAK, WHAM, POW (& couple others) Unpackers
>  are so simple (just search & replace), less CPU usage, around 80
>  bytes of coding to extract!
> 
> This is a work in progress. I am re-
> inventing the wheel here, I almost got it rounded out ;)
> 
> See some of my other demos & tools on 
> http://www.scriptcompress.com


Without even touching any of the other points your presenting, one response I'll give now is that size after compression isn't the ultimate goal. There are other aspects to take into account as well: Time required to (de)compress for instance on both ends.

As far as "packers" go, one has to keep in mind that these tools can break the semantics of the program. For instance: 

(function(){ console.log(arguments.callee.toSource().length) })();

I for one will not take this seriously until I see a better side by side comparison of your approach versus the multitude of others out there. 

Why shouldn't I just use a MAFF or MHTML or similar file with GZIP for instance?

[toc] | [prev] | [next] | [standalone]


#26932

FromChris White <0ntariokingston@gmail.com>
Date2015-02-25 12:47 -0800
Message-ID<7e28e4a6-7170-4123-b7cc-0a982973f97a@googlegroups.com>
In reply to#26931
On Wednesday, February 25, 2015 at 2:40:28 PM UTC-5, Michael Haufe (TNO) wrote:
> On Wednesday, February 25, 2015 at 11:50:43 AM UTC-6, Chris White wrote:
> > http://www.scriptcompress.com/JavaScript-Packers.htm is a web
> > application I made (download if you wish, it's all embedded, a stand
> > alone portable page) that will pack up Text, HTML or JavaScript 
> > to a self extracting & auto running web page archive in JavaScript. 
> > I am getting close to beating server side compression ratios, 
> > already with this page you can make a web page smaller than a self 
> > extracting zip archive made with WinZip or 7zip. Then by conver
> > ting say this page to an SVG image (make open a popup window so 
> > it works in Microsoft Internet Explorer,  like 
> > http://imgh.us/NIV-Holy-Bible.svgz 
> > where a 5MB app is compressed to 1.4MB) and then 
> > Gzip it and rename *.svgz and you will actually beat any server 
> > side compression!
> > 
> > Possible benefits:
> > -Some companies have to spend extra money on 
> > servers to handle extra CPU processes like having 
> > to decompress a file to a client that is "stupid".
> > -Host large web apps on free hosting (or even free image hosting as 
> > shown above) like blogs and forums, or even sites that allow you to
> > customize the look and feel of site like my demo: 
> > http://scriptcompress.master.com
> > -Client side compression just makes it so you can com-
> > press almost anything.
> > -Large scale websites can save more money 
> > with data transfers.
> > -WHAK, WHAM, POW (& couple others) Unpackers
> >  are so simple (just search & replace), less CPU usage, around 80
> >  bytes of coding to extract!
> > 
> > This is a work in progress. I am re-
> > inventing the wheel here, I almost got it rounded out ;)
> > 
> > See some of my other demos & tools on 
> > http://www.scriptcompress.com
> 
> 
> Without even touching any of the other points your presenting, one response I'll give now is that size after compression isn't the ultimate goal. There are other aspects to take into account as well: Time required to (de)compress for instance on both ends.
> 
> As far as "packers" go, one has to keep in mind that these tools can break the semantics of the program. For instance: 
> 
> (function(){ console.log(arguments.callee.toSource().length) })();
> 
> I for one will not take this seriously until I see a better side by side comparison of your approach versus the multitude of others out there. 
> 
> Why shouldn't I just use a MAFF or MHTML or similar file with GZIP for instance?

Good questions. MAFF is just zip but for FireFox web browser only, I made mine work in all browsers with JavaScript. MHTML is just base64 embedded files so everything is at least 30% bigger, this does defeat my purpose of making things smaller. If I make a *.gz file, most web browsers try to force download of it, not extraction and self executing.

[toc] | [prev] | [next] | [standalone]


#26966

From"Chris White AKA Dave Brown AKA WHAK.com" <0ntariokingston@gmail.com>
Date2015-03-03 17:33 -0800
Message-ID<f989145e-7d6f-4dc6-a901-584dc6990c46@googlegroups.com>
In reply to#26930
On Wednesday, February 25, 2015 at 12:50:43 PM UTC-5, Chris White AKA Dave Brown AKA WHAK.com wrote:
> http://www.scriptcompress.com/JavaScript-Packers.htm is a web
> application I made (download if you wish, it's all embedded, a stand
> alone portable page) that will pack up Text, HTML or JavaScript 
> to a self extracting & auto running web page archive in JavaScript. 
> I am getting close to beating server side compression ratios, 
> already with this page you can make a web page smaller than a self 
> extracting zip archive made with WinZip or 7zip. Then by conver
> ting say this page to an SVG image (make open a popup window so 
> it works in Microsoft Internet Explorer,  like 
> http://imgh.us/NIV-Holy-Bible.svgz 
> where a 5MB app is compressed to 1.4MB) and then 
> Gzip it and rename *.svgz and you will actually beat any server 
> side compression!
> 
> Possible benefits:
> -Some companies have to spend extra money on 
> servers to handle extra CPU processes like having 
> to decompress a file to a client that is "stupid".
> -Host large web apps on free hosting (or even free image hosting as 
> shown above) like blogs and forums, or even sites that allow you to
> customize the look and feel of site like my demo: 
> http://scriptcompress.master.com
> -Client side compression just makes it so you can com-
> press almost anything.
> -Large scale websites can save more money 
> with data transfers.
> -WHAK, WHAM, POW (& couple others) Unpackers
>  are so simple (just search & replace), less CPU usage, around 80
>  bytes of coding to extract!
> 
> This is a work in progress. I am re-
> inventing the wheel here, I almost got it rounded out ;)
> 
> See some of my other demos & tools on 
> http://www.scriptcompress.com

UPDATE: Now does PHP packing and obfuscating ;)

[toc] | [prev] | [next] | [standalone]


#27005

From"Chris White AKA Dave Brown AKA WHAK.com" <0ntariokingston@gmail.com>
Date2015-03-07 12:45 -0800
Message-ID<e559d28f-202f-45f5-866f-21998096fcf4@googlegroups.com>
In reply to#26930
On Wednesday, February 25, 2015 at 12:50:43 PM UTC-5, Chris White AKA Dave Brown AKA WHAK.com wrote:
> http://www.scriptcompress.com/JavaScript-Packers.htm is a web
> application I made (download if you wish, it's all embedded, a stand
> alone portable page) that will pack up Text, HTML or JavaScript 
> to a self extracting & auto running web page archive in JavaScript. 
> I am getting close to beating server side compression ratios, 
> already with this page you can make a web page smaller than a self 
> extracting zip archive made with WinZip or 7zip. Then by conver
> ting say this page to an SVG image (make open a popup window so 
> it works in Microsoft Internet Explorer,  like 
> http://imgh.us/NIV-Holy-Bible.svgz 
> where a 5MB app is compressed to 1.4MB) and then 
> Gzip it and rename *.svgz and you will actually beat any server 
> side compression!
> 
> Possible benefits:
> -Some companies have to spend extra money on 
> servers to handle extra CPU processes like having 
> to decompress a file to a client that is "stupid".
> -Host large web apps on free hosting (or even free image hosting as 
> shown above) like blogs and forums, or even sites that allow you to
> customize the look and feel of site like my demo: 
> http://scriptcompress.master.com
> -Client side compression just makes it so you can com-
> press almost anything.
> -Large scale websites can save more money 
> with data transfers.
> -WHAK, WHAM, POW (& couple others) Unpackers
>  are so simple (just search & replace), less CPU usage, around 80
>  bytes of coding to extract!
> 
> This is a work in progress. I am re-
> inventing the wheel here, I almost got it rounded out ;)
> 
> See some of my other demos & tools on 
> http://www.scriptcompress.com

Now you can import source code from website through URL query like: http://www.scriptcompress.com/JavaScript-Packers.htm?url=http://www.acme.com or get plain text of an online file and a bookmarklet available

[toc] | [prev] | [next] | [standalone]


#27006

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2015-03-08 10:01 +0100
Message-ID<12215281.CEOQ778StJ@PointedEars.de>
In reply to#26930
Chris White wrote:

> [spam]

FWIW:

| Complaints-To: groups-abuse@google.com

[x] done

F'up2 set

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not cc me. / Bitte keine Kopien per E-Mail.

[toc] | [prev] | [next] | [standalone]


#27009

From"Chris White AKA Dave Brown AKA WHAK.com" <0ntariokingston@gmail.com>
Date2015-03-08 18:34 -0700
Message-ID<5ba8eb43-acbc-4e5f-aef5-4069147d7cb1@googlegroups.com>
In reply to#27006
On Sunday, March 8, 2015 at 5:03:13 AM UTC-4, Thomas 'PointedEars' Lahn wrote:
> Chris White wrote:
> 
> > [spam]
> 
> FWIW:
> 
> | Complaints-To: groups-abuse@google.com
> 
> [x] done
> 
> F'up2 set
> 
> -- 
> PointedEars
> FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
> Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
> Please do not cc me. / Bitte keine Kopien per E-Mail.

How many people does it take to make your website? LOL!

Original LCARS design by Michael Okuda. Website design based on an implementation in Flash by Chris Rossi, and research by Bracer Jack and Eleanor C. Davenport.
Copyright (c) 2002-2015 Thomas 'PointedEars' Lahn. All rights reserved.

[toc] | [prev] | [next] | [standalone]


#27010

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2015-03-09 03:08 +0100
Message-ID<3286289.hY28b3vp2X@PointedEars.de>
In reply to#27009
Chris White AKA Dave Brown AKA WHAK.com wrote:

> How many people does it take to make your website? LOL!
> 
> Original LCARS design by Michael Okuda. Website design based on an
> implementation in Flash by Chris Rossi, and research by Bracer Jack and
> Eleanor C. Davenport. Copyright (c) 2002-2015 Thomas 'PointedEars' Lahn.
> All rights reserved.

It is unsurprising to me that you neither see your mistake nor can begin to 
fathom the honesty of giving attribution to the people from whose work one 
benefitted.

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not cc me. / Bitte keine Kopien per E-Mail.

[toc] | [prev] | [next] | [standalone]


#27007

From"Chris White AKA Dave Brown AKA WHAK.com" <0ntariokingston@gmail.com>
Date2015-03-08 08:42 -0700
Message-ID<9f70572a-8fb4-43f8-aa2b-2e5c11790f68@googlegroups.com>
In reply to#26930
On Wednesday, February 25, 2015 at 12:50:43 PM UTC-5, Chris White AKA Dave Brown AKA WHAK.com wrote:
> http://www.scriptcompress.com/JavaScript-Packers.htm is a web
> application I made (download if you wish, it's all embedded, a stand
> alone portable page) that will pack up Text, HTML or JavaScript 
> to a self extracting & auto running web page archive in JavaScript. 
> I am getting close to beating server side compression ratios, 
> already with this page you can make a web page smaller than a self 
> extracting zip archive made with WinZip or 7zip. Then by conver
> ting say this page to an SVG image (make open a popup window so 
> it works in Microsoft Internet Explorer,  like 
> http://imgh.us/NIV-Holy-Bible.svgz 
> where a 5MB app is compressed to 1.4MB) and then 
> Gzip it and rename *.svgz and you will actually beat any server 
> side compression!
> 
> Possible benefits:
> -Some companies have to spend extra money on 
> servers to handle extra CPU processes like having 
> to decompress a file to a client that is "stupid".
> -Host large web apps on free hosting (or even free image hosting as 
> shown above) like blogs and forums, or even sites that allow you to
> customize the look and feel of site like my demo: 
> http://scriptcompress.master.com
> -Client side compression just makes it so you can com-
> press almost anything.
> -Large scale websites can save more money 
> with data transfers.
> -WHAK, WHAM, POW (& couple others) Unpackers
>  are so simple (just search & replace), less CPU usage, around 80
>  bytes of coding to extract!
> 
> This is a work in progress. I am re-
> inventing the wheel here, I almost got it rounded out ;)
> 
> See some of my other demos & tools on 
> http://www.scriptcompress.com

If your comment is unrelated to my topic of "PHP and Compression" or PHP coding, then your comment is useless spam! A proper response would be to suggest ways to make something better or perhaps a question on how it works. Attacking me or making false accusations about me will not help anyone.

[toc] | [prev] | [next] | [standalone]


#27008

From"Chris White AKA Dave Brown AKA WHAK.com" <0ntariokingston@gmail.com>
Date2015-03-08 08:43 -0700
Message-ID<f9dc192a-4c0e-4387-890a-fc4f3ff8a901@googlegroups.com>
In reply to#26930
On Wednesday, February 25, 2015 at 12:50:43 PM UTC-5, Chris White AKA Dave Brown AKA WHAK.com wrote:
> http://www.scriptcompress.com/JavaScript-Packers.htm is a web
> application I made (download if you wish, it's all embedded, a stand
> alone portable page) that will pack up Text, HTML or JavaScript 
> to a self extracting & auto running web page archive in JavaScript. 
> I am getting close to beating server side compression ratios, 
> already with this page you can make a web page smaller than a self 
> extracting zip archive made with WinZip or 7zip. Then by conver
> ting say this page to an SVG image (make open a popup window so 
> it works in Microsoft Internet Explorer,  like 
> http://imgh.us/NIV-Holy-Bible.svgz 
> where a 5MB app is compressed to 1.4MB) and then 
> Gzip it and rename *.svgz and you will actually beat any server 
> side compression!
> 
> Possible benefits:
> -Some companies have to spend extra money on 
> servers to handle extra CPU processes like having 
> to decompress a file to a client that is "stupid".
> -Host large web apps on free hosting (or even free image hosting as 
> shown above) like blogs and forums, or even sites that allow you to
> customize the look and feel of site like my demo: 
> http://scriptcompress.master.com
> -Client side compression just makes it so you can com-
> press almost anything.
> -Large scale websites can save more money 
> with data transfers.
> -WHAK, WHAM, POW (& couple others) Unpackers
>  are so simple (just search & replace), less CPU usage, around 80
>  bytes of coding to extract!
> 
> This is a work in progress. I am re-
> inventing the wheel here, I almost got it rounded out ;)
> 
> See some of my other demos & tools on 
> http://www.scriptcompress.com

If your comment is unrelated to my topic of "Javascript and Compression", http://www.scriptcompress.com or JavaScript coding, then your comment is useless spam! A proper response would be to suggest ways to make something better or perhaps a question on how it works. Attacking me or making false accusations about me will not help anyone. 

[toc] | [prev] | [next] | [standalone]


#27011

From"Chris White AKA Dave Brown AKA WHAK.com" <0ntariokingston@gmail.com>
Date2015-03-08 19:32 -0700
Message-ID<5feabb71-9785-4cec-803e-aabe42c9fce7@googlegroups.com>
In reply to#26930
Here is the bookmarklet code:

javascript:window.open('http://www.scriptcompress.com/JavaScript-Packers.htm?url='+window.location.href);

Just drag and drop to you bookmark bar (favorites) and give it a familiar name. Just posting it here (it's on the page too) so everyone can see it's harmless JavaScript (trolls will say it's evil otherwise).

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.javascript


csiph-web