js-confuser icon indicating copy to clipboard operation
js-confuser copied to clipboard

2.0 string compression bloats file size by 886% vs 205% without

Open Mrgaton opened this issue 1 year ago • 6 comments

Im searching by a simple way of making strings not visible and something like roadroller https://github.com/lifthrasiir/roadroller joining all strings compressing them and then decompress them and spliting by a special char like � to have an array that can be acessed would be good for me i dont completly know how the code works but i think this is a bit too much.

Also String Concealing bloats file size even more by an 1122%

Mrgaton avatar Oct 03 '24 12:10 Mrgaton

String Compression includes the minified Pako library, maybe a smaller library can be opted for

MichaelXF avatar Oct 03 '24 17:10 MichaelXF

take a look at roadroller. It would be great if you combine all strings into a single big one and then compress that with roadroller.

Mrgaton avatar Oct 03 '24 17:10 Mrgaton

an enum to be able to use diferent compressions methods would be fantastic to be able to use previous version methods

Mrgaton avatar Oct 11 '24 19:10 Mrgaton

Changed to LZ-string in 2.0.0-alpha.3. Also RGF functions will no longer re-include the String Compression library.

MichaelXF avatar Nov 10 '24 23:11 MichaelXF

I sugest be able to change the algorithm to the older version on the new 2.0 version for cases when something simpler will work.

Mrgaton avatar Nov 11 '24 07:11 Mrgaton

I sugest be able to change the algorithm to the older version on the new 2.0 version for cases when something simpler will work.

The old algorithm had decoding problems, I think I found it on Stack overflow lol, so it probably shouldn't be used anymore. LZ string is 4.7KB compared to Pako's 21KB.

Maybe String Compression should use built-in browser/Node decompression functions? And it could be changed to run with Pack as the last transformation to reduce the entire code string Function("...")

MichaelXF avatar Nov 12 '24 03:11 MichaelXF