<form>
Input ze souboru <input type="file" onchange="CES.func.previewFile();">
<img src="" height="200" alt="Nahled obrazku, kdyz je soubor obrazek...">
<br>Input<br> <textarea id="inp" cols="80" rows="6"></textarea>
<br><input type="button" value="compress" onclick="CES.func.compress();">
<br>Output<br> <textarea id="out" cols="80" rows="6"></textarea>
<div id="stat"></div>
</form>

<!--script src='zlib.pretty.js'></script-->
<!--script src='zlib.min.js'></script-->
<!--script src='zip.min.js'></script-->

<script>
// ces.pas - myslim si, ze to deli byte po 2 bitech, spocita pocet opakovani a podle toho vytvori mapy true/false. Ktere navic zasifruje huffmanem.

// jeste jsem to moc neupravoval!!! 13.10.2020
// 14.10. nedokonceno


var CES = {};
CES.vars = {};
CES.vars.input = '';
CES.vars.input_count = 0;
CES.vars.tab = {};
CES.vars.map = '';
CES.vars.map_count;	// jenom slouzi ke kontrole, zda js spravne ulozil znak do mapy
CES.vars.map_bites;
CES.vars.map_byte;
CES.vars.map_list;
CES.vars.out_info = [];
CES.func = {};

CES.func.base64Encode = function (data)
	{
//	return window.btoa(data);	// mam pocit, ze s UTF-8 + diakritika si btoa neporadila, ale na soubory to snad bude ok
	var CHARS, out = "", i = 0, len = data.length, c1, c2, c3;
	var CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
	while (i < len)
		{
		c1 = data.charCodeAt(i++) & 0xff;
		if (i == len)
			{
			out += CHARS.charAt(c1 >> 2);
                	out += CHARS.charAt((c1 & 0x3) << 4);
                	out += "==";
                	break;
			}
		c2 = data.charCodeAt(i++);
		if (i == len)
			{
			out += CHARS.charAt(c1 >> 2);
			out += CHARS.charAt(((c1 & 0x3)<< 4) | ((c2 & 0xF0) >> 4));
			out += CHARS.charAt((c2 & 0xF) << 2);
			out += "=";
			break;
			}
		c3 = data.charCodeAt(i++);
		out += CHARS.charAt(c1 >> 2);
		out += CHARS.charAt(((c1 & 0x3) << 4) | ((c2 & 0xF0) >> 4));
		out += CHARS.charAt(((c2 & 0xF) << 2) | ((c3 & 0xC0) >> 6));
		out += CHARS.charAt(c3 & 0x3F);
		}
        return out;
	}

CES.func.base64Decode = function (data)
	{
	return window.atob(data);
	}

CES.func.base2Encode = function (data)
	{
	var i, i_end, out;
	out   = '';
	i_end = data.length;
	for (i = 0; i < i_end; i++)
		{
		out += ('0000000' + data[i].charCodeAt(0).toString(2)).slice(-8) + " ";
		}
	return out;
	}


CES.func.previewFile = function()
	{
	var preview = document.querySelector('img');
	var file    = document.querySelector('input[type=file]').files[0];
	var reader  = new FileReader();
	reader.addEventListener("load", function ()
		{
		data = CES.func.base64Encode(reader.result);
		document.getElementById('inp').value = data;
		preview.src = reader.result;
		}, false);
	if (file)
		{
		reader.readAsBinaryString(file)
		}
	}

CES.func.tablesCreate = function ()
	{
	var i, tab;
	tab = {};
	tab.ord  = {};
	tab.chr  = [];
	tab.freq = {};
	// ord(char), chr(ord), freq(char)
	for (i=0;i<256;i++)
		{
		chr = String.fromCharCode(i);
		tab.ord[chr]  = i;	// byte = ord(char)
		tab.chr[i]    = chr;	// char = chr(byte)
		tab.freq[chr] = [0, 0, 0, 0];
		tab.freq[chr][(i)    & 0x03] += 1;
		tab.freq[chr][(i>>2) & 0x03] += 1;
		tab.freq[chr][(i>>4) & 0x03] += 1;
		tab.freq[chr][(i>>6) & 0x03] += 1;
		}
	return tab;
	}

CES.func.ord = function (chr)
	{
	return CES.vars.tab.ord[chr];
	}

CES.func.chr = function (ord)
	{
	return CES.vars.tab.chr[ord];
	}

CES.func.frequencyCount = function (data)
	{
	var i, end_i, freq, freq_byte, chr;
	freq  = [0, 0, 0, 0];
	end_i = data.length;
	for (i=0;i<end_i;i++)
		{
//		chr = data.charAt(i);
		chr = data[i];
		freq_byte = CES.vars.tab.freq[chr];
		freq[0] += freq_byte[0];
		freq[1] += freq_byte[1];
		freq[2] += freq_byte[2];
		freq[3] += freq_byte[3];
		}
	return freq;
	}

//CES.func.mapAdd = function(bool)
//	{
//	CES.vars.map += bool ? 1 : 0;
//	}

CES.func.mapAddReset = function()
	{
	CES.vars.map_byte  = 0;
	CES.vars.map_bites = 7;
	}

CES.func.mapAddByte = function()
	{
	CES.vars.map += CES.func.chr(CES.vars.map_byte);
	CES.vars.map_count++;
	CES.func.mapAddReset();
	}

CES.func.mapAdd = function(bite)	//,n
	{
	var b;	//,n
	b = CES.vars.map_bites;
	//bite = (bool * 1);
	CES.vars.map_byte = CES.vars.map_byte | (bite << b);
	if (b>0)
		{
		b--;
		CES.vars.map_bites = b;
		return;
		}
	CES.func.mapAddByte();
	}
/*
var m_b:byte;
begin
  if ovl_bit=0 then mapa[ovl_byte]:=0;
  if co_dat=true then
    begin
      m_b:=1;
      m_b:=m_b shl ovl_bit;
      mapa[ovl_byte]:=mapa[ovl_byte]+m_b;
    end;
  inc(ovl_bit);
  if ovl_bit=8 then begin ovl_bit:=0;inc(ovl_byte);end;
*/

CES.func.mapAddAll = function(m, n)
	{
	if (m==0)
		{
		CES.func.mapAdd(n==0);
		}
	else {if (m==1)
		{
		if (n==1)
			{
			CES.func.mapAdd(true);
			}
		if (n==2 || n==3)
			{
			CES.func.mapAdd(false);
			}
		}
	else {if (m==2)
		{
		if (n==2)
			{
			CES.func.mapAdd(true);
			}
		if (n==3)
			{
			CES.func.mapAdd(false);
			}
		}}}
	}


CES.func.huffMapEncodeOne = function (n)
	{
	if (n==0)
		{
		CES.func.mapAdd(1);
		return;
		}
	else {if (n==1)
		{
		CES.func.mapAdd(0);
		CES.func.mapAdd(0);
		return;
		}
	else {if (n==2)
		{
		CES.func.mapAdd(0);
		CES.func.mapAdd(1);
		CES.func.mapAdd(0);
		return;
		}}}
	CES.func.mapAdd(0);
	CES.func.mapAdd(0);
	CES.func.mapAdd(0);
	}

CES.func.huffEncode = function (input)
	{
	var freq, order, map,i,end_i,j,end_j, m,n;
	freq  = CES.func.frequencyCount(input);
	order = [0, 1, 2, 3];
	order.sort(function(b,a){return freq[a]-freq[b];});	//desc
	CES.func.mapAddReset();
	CES.vars.map = '';
	CES.vars.map_count = 0;
	end_i = input.length;
	for (i=0;i<end_i;i++)
		{
		m = CES.func.ord(input[i]);
		n = m & 0x03; m >>= 2; CES.func.huffEncodeOne(order[n]);
		n = m & 0x03; m >>= 2; CES.func.huffEncodeOne(order[n]);
		n = m & 0x03; m >>= 2; CES.func.huffEncodeOne(order[n]);
		n = m & 0x03;          CES.func.huffEncodeOne(order[n]);
		}
	if (CES.vars.map_bites>0)
		{
		CES.func.mapAddByte();
		}
	return CES.vars.map;
	}

CES.func.inputToMap = function (freq,input)
	{
	var order, map,i,end_i,j,end_j, m,n;
//var x;
	order = [0,1,2,3];
	order.sort(function(b,a){return freq[a]-freq[b];});	//desc
//	alert([freq,order]);
	end_i = input.length;
//old_x = 0;
//	end_j = freq.length - 1;
	end_j = freq.length - 1 - 1;
	for (j=0;j<end_j;j++)
		{
		for (i=0;i<end_i;i++)
			{
			m = CES.func.ord(input[i]);
			n = m & 0x03; m >>= 2; CES.func.mapAddAll(j,order[n]);
			n = m & 0x03; m >>= 2; CES.func.mapAddAll(j,order[n]);
			n = m & 0x03; m >>= 2; CES.func.mapAddAll(j,order[n]);
			n = m & 0x03;          CES.func.mapAddAll(j,order[n]);
			}
//	CES.vars.map += '<br>';
		}
//	CES.vars.map += ' '+(CES.vars.map.length-3)+'/'+(input.length<<3) + ' '+ input.length;
	if (CES.vars.map_bites>0)
		{
		CES.func.mapAddByte();
		}

	CES.vars.mapx = CES.vars.map;
	CES.func.mapAddReset();
	CES.vars.map = '';
	end_j = freq.length - 1;
	for (j=2;j<end_j;j++)
		{
		for (i=0;i<end_i;i++)
			{
			m = CES.func.ord(input[i]);
			n = m & 0x03; m >>= 2; CES.func.mapAddAll(j,order[n]);
			n = m & 0x03; m >>= 2; CES.func.mapAddAll(j,order[n]);
			n = m & 0x03; m >>= 2; CES.func.mapAddAll(j,order[n]);
			n = m & 0x03;          CES.func.mapAddAll(j,order[n]);
			}
		}
/*
	CES.vars.mapy = CES.vars.map;
	CES.func.mapAddReset();
	CES.vars.map = '';
	end_j = freq.length - 1;
	for (j=2;j<end_j;j++)
		{
		for (i=0;i<end_i;i++)
			{
			m = CES.func.ord(input[i]);
			n = m & 0x03; m >>= 2; CES.func.mapAddAll(j,order[n]);
			n = m & 0x03; m >>= 2; CES.func.mapAddAll(j,order[n]);
			n = m & 0x03; m >>= 2; CES.func.mapAddAll(j,order[n]);
			n = m & 0x03;          CES.func.mapAddAll(j,order[n]);
			}
		}
*/
	return CES.vars.map;
	}

// compress 2


CES.func.maplistReset = function()
	{
	var list;
	list = [];
	list[0] = {map: '', count: 0, bites: 7, byte: 0, huff_failed: false};
	list[1] = {map: '', count: 0, bites: 7, byte: 0, huff_failed: false};
	list[2] = {map: '', count: 0, bites: 7, byte: 0, huff_failed: false};
	CES.vars.map_list = list;
	}

CES.func.maplistExport = function()
	{
	var list = CES.vars.map_list;
	return list[0].map + list[1].map + list[2].map;
	}


CES.func.maplistAddReset = function(m)
	{
	CES.vars.map_list[m].byte  = 0;
	CES.vars.map_list[m].bites = 7;
	}

CES.func.maplistAddByte = function(m, byte)
	{
	CES.vars.map_list[m].map += CES.func.chr(byte);
	CES.vars.map_list[m].count++;
	CES.func.maplistAddReset(m);
	}

CES.func.maplistAdd = function(m, bite)	//,n
	{
	var b;	//,n
	b = CES.vars.map_list[m].bites;
	//bite = (bool * 1);
	CES.vars.map_list[m].byte = CES.vars.map_list[m].byte | (bite << b);
	if (b>0)
		{
		b--;
		CES.vars.map_list[m].bites = b;
		return;
		}
	CES.func.maplistAddByte(m, CES.vars.map_list[m].byte);
	}

CES.func.maplistAddAll = function(value, freq_list)
	{
//CES.vars.el['stat'].innerHTML += value + ' ';	// show bin2; dvojbity jsou pozpatku, ok
	if (value==freq_list[0])
		{
		CES.func.maplistAdd(0, 0);
		}
	else { if (value==freq_list[1])
		{
		CES.func.maplistAdd(0, 1);
		CES.func.maplistAdd(1, 0);
		}
	else { if (value==freq_list[2])
		{
		CES.func.maplistAdd(0, 1);
		CES.func.maplistAdd(1, 1);
		CES.func.maplistAdd(2, 0);
		}
	else	{
		CES.func.maplistAdd(0, 1);
		CES.func.maplistAdd(1, 1);
		CES.func.maplistAdd(2, 1);
		}}}
	}

/*
CES.func.mapAddAllHuff = function(value)	// map=bite2
	{
	if (value==0)
		{
		CES.func.maplistAdd(0, 0);
		}
	else	{	// m==1 || m==2 || m==3
		CES.func.maplistAdd(value>>1);
		CES.func.maplistAdd(value & 0x01);
		}
	}
*/
CES.func.huffEncode2 = function (data, order)
	{
	var fn, order, i, i_end, m, n, freq;
	fn = CES.func;
	freq  = CES.func.frequencyCount(data);
CES.vars.el['stat'].innerHTML += '<br>map freq '+ JSON.stringify(freq);
	order = [0, 1, 2, 3];
	order.sort(function(b,a){return freq[a]-freq[b];});	//desc
//alert([freq, order])
	fn.mapAddReset();
	CES.vars.map = '';
	CES.vars.map_count = 0;
	end_i = data.length;
	for (i=0; i<end_i; i++)
		{
		m = CES.func.ord(data[i]);
		n = m & 0x03; m >>= 2; fn.huffMapEncodeOne(order[n]);
		n = m & 0x03; m >>= 2; fn.huffMapEncodeOne(order[n]);
		n = m & 0x03; m >>= 2; fn.huffMapEncodeOne(order[n]);
		n = m & 0x03;          fn.huffMapEncodeOne(order[n]);
		}
	if (CES.vars.map_bites!==7)
		{
		CES.func.mapAddByte();
		}
	return CES.vars.map;
	}

CES.func.mapsToHuff = function ()
	{
	var fn, map, i, i_end, m, m_end, value, n, new_data, value, arr, freq;
	// huffman code maps
	fn = CES.func;
	m_end = CES.vars.map_list.length;
	for (m=0; m<m_end; m++)
		{
		if (CES.vars.map_list[m].huff_failed==true)
			{
			continue;	// nepokousej se huffmanovat mapu, ktera pri predchozim kroku nesla, usetris cas
			}
//		order = [0, 1, 2, 3];
		order = null;
		data  = CES.vars.map_list[m].map;
		i_end = data.length;
//		for (i=0; i<i_end; i++)
//			{
			new_data = fn.huffEncode2(data, order);
//			}
CES.vars.el['stat'].innerHTML += '<br>huff '+ new_data.length + ' | ' + i_end;
		if (new_data.length<i_end)
			{
			CES.vars.out_info[m+1] = 1;
			CES.vars.map_list[m].map = new_data;
			}
		else	{
			CES.vars.out_info[m+1] = 0;
			CES.vars.map_list[m].huff_failed = true;
			}
		}	
CES.vars.el['stat'].innerHTML += '<hr>';
	}

CES.func.compressEncode = function (data)	// vynechavam predchozi kod a radeji si napisi vlastni novou compress
	{
	var fn, map, i, i_end, m, m_end, value, n, new_data, value, arr, freq;
	fn = CES.func;
	fn.maplistReset();


	freq  = CES.func.frequencyCount(data);
CES.vars.el['stat'].innerHTML += 'data freq '+ JSON.stringify(freq);
	order = [0, 1, 2, 3];
	order.sort(function(b,a){return freq[a]-freq[b];});	//desc
//	alert([freq, order]);
	// mapping
	i_end = data.length;
//CES.vars.el['stat'].innerHTML += 'data = '+i_end;
//CES.vars.el['stat'].innerHTML += '<br>';
	for (i=0; i<i_end; i++)
		{
		value = fn.ord(data[i]);
		n = value & 0x03; value >>= 2; fn.maplistAddAll(n, order);
		n = value & 0x03; value >>= 2; fn.maplistAddAll(n, order);
		n = value & 0x03; value >>= 2; fn.maplistAddAll(n, order);
		n = value & 0x03;              fn.maplistAddAll(n, order);
		}
	// add last byte
	m_end = CES.vars.map_list.length;
	for (m=0; m<m_end; m++)
		{
		if (CES.vars.map_list[m].bites!==7)
			{
			fn.maplistAddByte(m, CES.vars.map_list[m].byte);
			}
		}



/*
// show binary map
arr = [
	CES.func.base2Encode(CES.vars.map_list[0].map), "<hr>",
	CES.func.base2Encode(CES.vars.map_list[1].map), "<hr>",
	CES.func.base2Encode(CES.vars.map_list[2].map), "<hr>"
];
CES.vars.el['stat'].innerHTML += '<br>' + arr.join(' | ');
*/
arr = [
	CES.vars.map_list[0].map.length,
	CES.vars.map_list[1].map.length,
	CES.vars.map_list[2].map.length
];
CES.vars.el['stat'].innerHTML += '<br>map len '+ arr.join(', ') + ' | ' + (arr[0]+arr[1]+arr[2]);
/*
	// huffman code maps
	for (m=0; m<m_end; m++)
		{
//		order = [0, 1, 2, 3];
		order = null;
		data  = CES.vars.map_list[m].map;
		i_end = data.length;
		for (i=0; i<i_end; i++)
			{
			new_data = fn.huffEncode2(data, order);
			}
CES.vars.el['stat'].innerHTML += '<br>huff '+ new_data.length + ' | ' + i_end;
		if (new_data.length<i_end)
			{
			CES.vars.out_info[m+1] = 1;
			CES.vars.map_list[m].map = new_data;
			}
		else	{
			CES.vars.out_info[m+1] = 0;
			}
		}	
*/
CES.func.mapsToHuff();

CES.func.mapsToHuff();
CES.func.mapsToHuff();
CES.func.mapsToHuff();
CES.func.mapsToHuff();
CES.func.mapsToHuff();
CES.func.mapsToHuff();
CES.func.mapsToHuff();
CES.func.mapsToHuff();
CES.func.mapsToHuff();
CES.func.mapsToHuff();	// 90%, prostredni mapa se da huffmanovat stale dokola :) a ted je otazka, zda to neni bug

/*
// show binary map
arr = [
	CES.func.base2Encode(CES.vars.map_list[0].map), "\n",
	CES.func.base2Encode(CES.vars.map_list[1].map), "\n",
	CES.func.base2Encode(CES.vars.map_list[2].map), "\n"
];
CES.vars.el['stat'].innerHTML += '<br>' + arr.join(' | ');
*/
arr = [
	CES.vars.map_list[0].map.length,
	CES.vars.map_list[1].map.length,
	CES.vars.map_list[2].map.length
];
CES.vars.el['stat'].innerHTML += '<br>out len '+ arr.join(', ') + ' | ' + (arr[0]+arr[1]+arr[2]);
	return fn.maplistExport(); // + info
	}

CES.func.compress = function ()
	{
	var freq, out, inp, el_inp, el_out, el_stat, arr;
	arr = [];
	CES.vars.el['stat'].innerHTML = '';
	// input read
	inp     = CES.vars.el['inp'].value;
	inp     = CES.func.base64Decode(inp);
	CES.vars.out_info[0] = inp.length;	// out info
	arr[0] = inp.length;
//CES.vars.el['stat'].innerHTML += CES.func.base2Encode(inp);	// sho binary input
//alert(inp)	// Ahoj

//	CES.vars.input = input;
//	freq = CES.func.frequencyDetect(inp);
//	out = CES.func.inputToMap(freq, inp)
//	out = CES.func.huff(out);
//	out += CES.func.huff(CES.vars.mapx);
//	out += CES.func.huff(CES.vars.mapy);

	out = CES.func.compressEncode(inp);
	arr[1] = out.length;

	// output write
	out = CES.func.base64Encode(out);
	CES.vars.el['out'].value  = out;
	CES.vars.el['stat'].innerHTML += '<br>out/inp = ' + arr[1] + ' / ' + arr[0] + ' | '+(Math.floor((arr[1]/arr[0])*10000)/100)+'%';
//	el_stat.innerHTML += 'out = ' + out.length + ' / ' + inp.length + ' = inp; '+(Math.floor((out.length/inp.length)*100)/10000)+'%';
	}


CES.func.init = function ()
	{
	var inp;
	CES.vars.tab = CES.func.tablesCreate();
	CES.vars.el = {
		'inp' : document.getElementById('inp'),
		'out' : document.getElementById('out'),
		'stat': document.getElementById('stat')
		};
//	inp = 'Ahoj';	// 01000001 01101000 01101111 01101010 bin
//	inp = 'Ah';	// 01000001 bin
//	inp = CES.func.base64Encode(inp);	// string to base64
//	inp = 'R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOyDZu6QdvCchPGolfO0o/XBs/fNwfjZ0frl3/zy7////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkAABAALAAAAAAQABAAAAVVICSOZGlCQAosJ6mu7fiyZeKqNKToQGDsM8hBADgUXoGAiqhSvp5QAnQKGIgUhwFUYLCVDFCrKUE1lBavAViFIDlTImbKC5Gm2hB0SlBCBMQiB0UjIQA7'; // image star.gif
	inp = 'UmFyIRoHAQDz4YLrCwEFBwAGAQGAgIAAp8/5fS4CAwuzCQSTGiD88nB1gAUAEnBhc3N3b3JkLWdlbmVyLmh0bQoDAkhmQJYEb8kByDmvBFBkQzMzPzUGX/3nL4OGbZalE2Um3La4m0rE003HImk6knZZa70BFFJGMok0krpkrvu7ZUwdB6E10xvw98ZQ6M3MzQNAJ8e3tG5u6Pt5g3cA/GDm+IcW1ubhLXurks2qnTZJaFjnrC1Sq1SdNKzZGPY5Cc1StUsUrUBP+v6h/EJuqj/ptuZSP31yLN3GGrxO59tF/11KQg27pMreF0XLXQCm42thwLjPPF73fVK5cQPMlefPHLyIzjr8nv74fMDoonXkO+dwJXDXnhzGJlzQGHvCV6xkwdHCps2adjn6bRKtKtzdVITfoKewuItlZ1hx9SjCrVxdvA+KzmCFfLkyerF3BMVCxgz2i0dgeRFgS0JrwDxl7m3Q1Cn/wcMCerbIs3RdHhtpkGhsV9JJCRDAkLwmBpCWX2tol999yfNm/A2Uk+VNNi7ojn9Fi8a5neFu7haWfYCKS8AtgzAA9bDglM2wZi3tkwo/ZZPkBQZb4RgIldAZV9W6y2Ham06iGlAL5xlpHBIImPyxiTIrXCCPt0ybTvidJTQVLYc4Tgb4z/mFxzubG0sFL5HwioYglZ0iRZ4d4lAik7d3t/0fh+P5cHpU4UgkEseeW2tcXu3r7Hw7GcDTbn+jGEkYseTL8Yh9CZA6XHT5KnLzevn9ntq9Fav0/pYs2ur9fd+3v/fvxDXgf+f/ter7Pt839fd55Uvc/uhM/j5fz29fX/3DP+/rU2+JWjN/MkUUsaFsieDQ6JTNisXSQz2MTMDDwry8xEImUM6YQjUS5qBiMrOARLUEMyg8RK0EMygxNA0Ocqf9pPys6judt5myu1eEbL0m+ByUextu3JSQid5kI+2S6wNpqyJxDcqnlENvqO8QXXPRGDtkr4rnihE3YYVNyGGg4iHipSdWNuSonQpLPkoknDQdGUbxM8FV3jnFJl02gLonoJR1ti5kMhbvCixxESoF2ZMNfQ3+qYXkZv6DG7YtzAf03ps0lQ3Lw/TNNR0fI6LpsfYNF2vh6Dp8PfGw95DulOFTZWNjhxHV3z9e+MT8CahwTvMS2KJBk0JyMsF4rLF5qhJHXD+RqdgI0UHtBTBlPcUkFfgIo4XlNsg9VBVjEBZK0Ba8881pNU+RJ9zCBD+VwHYAXW7AW5EpUigIiMlcD6b2zhz7URwyLoXXl9nEn3TgfzUGs+/lFHmRL01OgI9E6p6L0eij3jtFUUw8dosmI8hovIrq0+jGwivpNGYeqpPJzW6HPjjElDchhqqOkzEVnCKnOBQjzHxFjfo65SqG5TkiI5GyU8n0aiPnOlN3p2kTpp+Dmkx9TxkrL442mhka+d85Ztu+F1WxYfbah0U5gkhIKPmcigKD47aYYi3YMuHozVRzWViCKogEoA5k+knVDUbCJhdsmgHj0shBg20AkjnWr33pCmPm+jC6kvHqj2JUepaD7J43tYVyOLWzIbFryOGcQaXwn7Z5p8/XUxRUlmuOUZHfAR4eg26UYFBQrrBWQsA/M4l32Fio4VKbm8EXldXk/XeeI463iYuBhIpbt5ScRRFANdBPofXh4/2Lm+voFOm+zIN0tE8iBlZzrM6I/XXCOMzh96m+r6PST28ZvWIAHXdWUQMFBAA='; // test-rar.rar
	CES.vars.el['inp'].value = inp;
	}

var input, data_star;
CES.func.init();
CES.func.compress();
</script>

