Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

compress string javascript

function en(c){var x='charCodeAt',b,e={},f=c.split(""),d=[],a=f[0],g=256;for(b=1;b<f.length;b++)c=f[b],null!=e[a+c]?a+=c:(d.push(1<a.length?e[a]:a[x](0)),e[a+c]=g,g++,a=c);d.push(1<a.length?e[a]:a[x](0));for(b=0;b<d.length;b++)d[b]=String.fromCharCode(d[b]);return d.join("")}

function de(b){var a,e={},d=b.split(""),c=f=d[0],g=[c],h=o=256;for(b=1;b<d.length;b++)a=d[b].charCodeAt(0),a=h>a?d[b]:e[a]?e[a]:f+c,g.push(a),c=a.charAt(0),e[o]=f+c,o++,f=a;return g.join("")}

var compressed=en("http://www.ScriptCompress.com - Simple Packer/Minify/Compress JavaScript Minify, Fixify & Prettify 75 JS Obfuscators In 1 App 25 JS Compressors (Gzip, Bzip, LZMA, etc) PHP, HTML & JS Packers In 1 App PHP Source Code Packers Text Packer HTML Packer or v2 or v3 or LZW Twitter Compress or More Words DNA & Base64 Packer (freq tool) or v2 JS JavaScript Code Golfer Encode Between Quotes Decode Almost Anything Password Protect Scripts HTML Minifier v2 or Encoder or Escaper CSS Minifier or Compressor v2 SVG Image Shrinker HTML To: SVG or SVGZ (Gzipped) HTML To: PNG or v2 2015 JS Packer v2 v3 Embedded File Generator Extreme Packer or version 2 Our Blog DemoScene JS Packer Basic JS Packer or New Version Asciify JavaScript Escape JavaScript Characters UnPacker Packed JS JavaScript Minify/Uglify Text Splitter/Chunker Twitter, Use More Characters Base64 Drag 'n Drop Redirect URL DataURI Get Words Repeated LZMA Archiver ZIP Read/Extract/Make BEAUTIFIER & CODE FIXER WHAK-A-SCRIPT JAVASCRIPT MANGLER 30 STRING ENCODERS CONVERTERS, ENCRYPTION & ENCODERS 43 Byte 1px GIF Generator Steganography PNG Generator WEB APPS VIA DATAURL OLD VERSION OF WHAK PAKr Fun Text Encrypt Our Google");
var decompressed=de(compressed);

document.writeln('<hr>'+compressed+'<hr><h1>'+compressed.length+' characters versus original '+decompressed.length+' characters.</h1><hr>'+decompressed+'<hr>');
Comment

PREVIOUS NEXT
Code Example
Javascript :: json fetch data doest show 
Javascript :: httpget javascript 
Javascript :: jquery source disable right click 
Javascript :: (node:2736) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead. 
Javascript :: run react app in react 18 
Javascript :: javascript select all divs with class 
Javascript :: how to add two elements in one path in react router v6 
Javascript :: printf javasscript 
Javascript :: run a loop inside a console.log no blank line 
Javascript :: check if item exists in localstorage javascript 
Javascript :: what is niceScroll 
Javascript :: react construct 
Javascript :: postman test save token 
Javascript :: how to validate age above 18 in javascript 
Javascript :: convert number to string date js 
Javascript :: set stroke color canvas 
Javascript :: summation of array elements 
Javascript :: How to access the request body when POSTing using Node.js and Express 
Javascript :: number pyramid javascript 
Javascript :: split a message 
Javascript :: reset form javascript/jquery 
Javascript :: node js run bat file 
Javascript :: How to make "select option" select option for quantity 
Javascript :: javascript create a function that counts the number of syllables a word has. each syllable is separated with a dash -. 
Javascript :: how to detect clicks with javascript 
Javascript :: parse int into 2 digits format javascript 
Javascript :: string remove accents 
Javascript :: how to change background image for a webpage 
Javascript :: convert class object to json node js 
Javascript :: how to import jquery in js file 
ADD CONTENT
Topic
Content
Source link
Name
2+5 =