亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? de-compression.js

?? ajax patterns 這是關(guān)于ajax設(shè)計(jì)模式方面的原代碼
?? JS
字號:
/*    Copyright 2006 Christian Gross http://www.devspace.com    From the book Ajax Patterns and Best Practices   Licensed under the Apache License, Version 2.0 (the "License");   you may not use this file except in compliance with the License.   You may obtain a copy of the License at       http://www.apache.org/licenses/LICENSE-2.0   Unless required by applicable law or agreed to in writing, software   distributed under the License is distributed on an "AS IS" BASIS,   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   See the License for the specific language governing permissions and   limitations under the License.*/<HTML><HEAD><TITLE>Huffman JavaScript Compression</TITLE><link REL="SHORTCUT ICON" HREF="/favicon.ico"><script language="JavaScript"><!--         function MakeIntoString(S) {   S = StringReplace("\\", "\\\\", S);   S = StringReplace("\"", "\\\"", S);   S = StringReplace("\n", "\\n", S);   return S;}function BitsToBytes(i) {   o = 42;   if (i.charAt(0) == '1')      o += 32;   if (i.charAt(1) == '1')      o += 16;   if (i.charAt(2) == '1')      o += 8;   if (i.charAt(3) == '1')      o += 4;   if (i.charAt(4) == '1')      o += 2;   if (i.charAt(5) == '1')      o += 1;   if (o >= 92)      o ++;   return String.fromCharCode(o);}function CompressConfirm() {   if (confirm("Are you sure that you want to do this?  It can take a long time!")) {      CompressCode();   }}function CompressCode() {   // Do initial scan   var Letters = new Array(256);   var LetterCodes = new Array(256);   var C = document.daForm.Comp;   var P = document.daForm.Progress;      C.value = "Working ...";   P.value = "Counting Letters";      for (i = 0; i < 256; i ++)   {      Letters[i] = 0;   }      for (i = 0; i < document.daForm.Orig.value.length; i ++)   {      if ((i & 0xFF) == 0)         P.value = "Counting Letters - " + 	    Math.floor((100 * i) / document.daForm.Orig.value.length) + "%"      Letters[document.daForm.Orig.value.charCodeAt(i)] ++;   }//   This is a testing tree//   It should produce a list like this://               __[  ]__//         [  ]~~        ~~[  ]__//       50    51        52      ~~[  ]//                               53    54////   Letters[50] = 7;//   Letters[51] = 6;//   Letters[52] = 5;//   Letters[53] = 2;//   Letters[54] = 1;      // Build a Huffman tree from the letter count frequencies   var NodeLetter = new Array(512);   var NodeCount = new Array(512);   var NodeChild1 = new Array(512);   var NodeChild2 = new Array(512);   NextParent = 0;   P.value = "Constructing node list";   for (i = 0; i < 256; i ++)   {      if (Letters[i] > 0)      {         NodeLetter[NextParent] = i;	 NodeCount[NextParent] = Letters[i];	 NodeChild1[NextParent] = -1;	 NodeChild2[NextParent] = -1;	 NextParent ++;      }   }      // Built node list.  Now combine nodes to make a tree   P.value = "Constructing tree";   SmallestNode2 = 1;   while (SmallestNode2 != -1)   {      SmallestNode1 = -1;      SmallestNode2 = -1;            for (i = 0; i < NextParent; i ++)      {         if (NodeCount[i] > 0)	 {	    if (SmallestNode1 == -1)	    {	       SmallestNode1 = i;	    }	    else if (SmallestNode2 == -1)	    {	       if (NodeCount[i] < NodeCount[SmallestNode1])	       {	          SmallestNode2 = SmallestNode1;		  SmallestNode1 = i;	       }	       else	       {	          SmallestNode2 = i;	       }	    }	    else if (NodeCount[i] <= NodeCount[SmallestNode1])	    {	       SmallestNode2 = SmallestNode1;	       SmallestNode1 = i;	    }	 }      }            if (SmallestNode2 != -1)      {         NodeCount[NextParent] = NodeCount[SmallestNode1] +	    NodeCount[SmallestNode2];	 NodeCount[SmallestNode1] = 0;	 NodeCount[SmallestNode2] = 0;	 // Reversed SmallestNode numbers here for ordering in the tree	 NodeChild1[NextParent] = SmallestNode2;	 NodeChild2[NextParent] = SmallestNode1;	 NextParent ++;      }   }      // We have constructed the nodes.  Now rewrite the list into a single   // array.   // The value of an array element will be positive if it is the   // character code we want.  Otherwise, it branches.  The left branch   // will be the next array element.  The value of the array will be   // (offset * -1), which is the right branch.   P.value = "Making final array";   var FinalNodes = Array(NextParent);   var DepthIndex = Array(256);   Depth = 0;   NextFinal = 0;   DepthIndex[Depth] = SmallestNode1;   while (Depth >= 0)   {      // If there is a left and right, push them on the stack      if (NodeChild1[DepthIndex[Depth]] > -1 &&         NodeChild2[DepthIndex[Depth]] > -1)      {         idx = NodeChild1[DepthIndex[Depth]];	 NodeChild1[DepthIndex[Depth]] = -2 - NextFinal;	 Depth ++;	 DepthIndex[Depth] = idx;	 NextFinal ++;      }      // If there is a left and a right, but the left was taken,      // push the right on the stack.      else if (NodeChild1[DepthIndex[Depth]] < 0 &&         NodeChild2[DepthIndex[Depth]] > -1)      {	 // Update the FinalNodes[] with the location for the right	 // branch.	 idx = NodeChild1[DepthIndex[Depth]];	 idx = 0 - idx;	 idx -= 2;	 FinalNodes[idx] = - NextFinal;	 	 // Traverse right branch         idx = NodeChild2[DepthIndex[Depth]];	 NodeChild2[DepthIndex[Depth]] = -2	 Depth ++;	 DepthIndex[Depth] = idx;      }      // If there was a left and a right, but they were both taken,      // pop up a level      else if (NodeChild1[DepthIndex[Depth]] < -1 &&         NodeChild2[DepthIndex[Depth]] < -1)      {         Depth --;      }      // If we have a child here, add it to the final nodes, pop up      else if (NodeChild1[DepthIndex[Depth]] == -1 &&         NodeChild2[DepthIndex[Depth]] == -1)      {         FinalNodes[NextFinal] = NodeLetter[DepthIndex[Depth]];	 NextFinal ++;	 Depth --;      }      // This shouldn't ever happen      else      {         alert('Bad algorithm!');	 return;      }   }         // We have the tree.  Associate codes with the letters.   P.value = "Determining codes";   var CodeIndex = new Array(256);   DepthIndex[0] = 0;   CodeIndex[0] = "";   Depth = 0;   while (Depth >= 0)   {      if (FinalNodes[DepthIndex[Depth]] < 0)      {         c = CodeIndex[Depth];         idx = DepthIndex[Depth];         DepthIndex[Depth + 1] = DepthIndex[Depth] + 1;	 CodeIndex[Depth + 1] = c + '0';	 DepthIndex[Depth] = 0 - FinalNodes[idx];	 CodeIndex[Depth] = c + '1';	 Depth ++;      }      else      {         LetterCodes[FinalNodes[DepthIndex[Depth]]] = CodeIndex[Depth];	 Depth --;      }   }         // Build resulting data stream   // The bits string could get very large   P.value = "Building data stream";   bits = "";   bytes = "";   for (i = 0; i < document.daForm.Orig.value.length; i ++)   {      if ((i & 0xFF) == 0)      {         P.value = "Building Data Stream - " + 	    Math.floor((100 * i) / document.daForm.Orig.value.length) + "%";      }      bits += LetterCodes[document.daForm.Orig.value.charCodeAt(i)];      while (bits.length > 5)      {         bytes += BitsToBytes(bits);	 bits = bits.slice(6, bits.length);      }   }   bytes += BitsToBytes(bits);      P.value = "Writing final script"      S = "<scr" + "ipt language=\"JavaScript1.2\">\n<!--\n";   S += "l=new Array(";   for (i = 0; i < FinalNodes.length; i ++)   {      if (i > 0)         S += ",";	       // The % operator acts funny in a few browsers      if (i > 0 && Math.floor(i / 20) == Math.ceil(i / 20))         S += "\n";	       S += FinalNodes[i];   }   S += ");\n";   S += "d=";   while (bytes.length > 74)   {      S += '"' + bytes.slice(0, 74) + "\"\n+";      bytes = bytes.slice(74, bytes.length);   }   S += '"' + bytes + "\";\n";   S += 'c=' + document.daForm.Orig.value.length + ";b=a=0;o=\"\";\n";   S += "function GetBit(){if(a==0){b=d.charCodeAt(0)-42;\n";   S += "if(b>50)b--;d=d.slice(1,d.length);a=6;}a--;\n";   S += "return ((b >> a) & 0x01);}\n";   S += "window.status='Decompressing';\n";   S += "while(c--){i=0;while(l[i]<0){if(GetBit())i=-l[i];else i++;}\n";   S += "o+=String.fromCharCode(l[i]);}document.write(o);\n";   S += "window.status='Document Loaded';\n";   S += "// --></scr" + "ipt>";      C.value = S;   P.value = "Done.  Compressed by " +      Math.floor(100 * (document.daForm.Orig.value.length - S.length) /      document.daForm.Orig.value.length) + "% (" +       document.daForm.Orig.value.length + " -> " + S.length + ")"}function CreatePopup(str){    ShowMeWindow = window.open("", "", "location=no,directories=no,menubar=no," +        "resizable=yes,scrollbars=yes,status=yes,toolbar=no,width=300,height=240");    ShowMeWindow.document.write(str);    ShowMeWindow.document.close();}--></script><!-- These pages are (C)opyright 2002-2005, Tyler Akins --><!-- Fake email for spambots: jsimmons@rumkin.com --><link rel="stylesheet" type="text/css" media="screen, projection" href="/inc/normal.css" title="Default"><link rel="stylesheet" type="text/css" media="print" href="/inc/print.css" title="Print"><script language=javascript src="/inc/site.js"></script><script language="JavaScript1.2" src="/inc/site2.js"></script></head><body><p><div>   <table align=left border=0 cellpadding=0 cellspacing=0 class=menutable>      <tr><td align=center><div class=menu>      <a class="menu" href="/"      onmouseover="CheckVer(1.2, 'MenuDesc(-1)')">Rumkin</a> |      <a id="ml1" href="/fun/" onmouseover="CheckVer(1.2, 'MenuDesc(1)')"      class="menu" onmouseout="CheckVer(1.2, 'SetMenuHide()')">Fun</a> |      <a id="ml2" href="/reference/" onmouseover="CheckVer(1.2, 'MenuDesc(2)')"      class="menu" onmouseout="CheckVer(1.2, 'SetMenuHide()')">Info</a> |       <a id="ml0" href="/software/" onmouseover="CheckVer(1.2, 'MenuDesc(0)')"      class="menu" onmouseout="CheckVer(1.2, 'SetMenuHide()')">Software</a> |      <a id="ml3" href="/tools/" onmouseover="CheckVer(1.2, 'MenuDesc(3)')"      class="menu" onmouseout="CheckVer(1.2, 'SetMenuHide()')">Tools</a>      <ilayer name=dep1><layer name=dep2></layer></ilayer>      <div class=submenu id=describe></div>      </div>   </tr></td></table>    <h1 class="pagetitle">Huffman JavaScript Compression</h1></div></p><p>Huffman encoding is based on the principle that letters that appear morefrequently should have a smaller code than the ones that are used moreoften.  So, in the English language, vowels would be used more than theletter 'z', and would get shorter codes.  This javascript-based compressionexample uses this method to compress whatever you give it.  It can work onweb pages, javascript code, and tons more.  The downfall is that it isextremely slow.  It also re-encodes the binary data in a method similar toUUEncode, which inflates 3 bytes of binary data to 4 bytes of textual data,so some of the awesome compression that is possible will be eliminated fromthe expansion of data.</p>	<p>Here are my thoughts on this experiment:</p>	<table align=center><tr><th>Good</th><th>Bad</th></tr><tr><td>  <ul>  <li>It works!  <li>The decompression code really isn't all that big.  <li>The decompression code isn't all that slow either.  </ul></td><td>  <ul>  <li>The array for the nodes looks like it consumes way too much space.  <li>Re-encoding the binary data (33% increase) negates the compression savings.  <li>JavaScript <b>really</b> shouldn't be used for compressing data (too slow)  </ul></td></tr></table><p>Test it out for yourself.  Insert web pages, javascript, or just simpletext and then press the button.  It can take quite a while (15k of a webpage takes minutes on my computer).  The advantages of having it run allclient-side in JavaScript are that it is all client-side (you don't send anyconfidential data to my server) and it's quick to write.Start with small files and work your way larger.</p>	<p>I have a feeling that this would work great if you performed thecompression across all of your pages if you could generate the "l" arraybased on the letter frequency of all of your web pages, and then put thedecompression code and the "l" array in an external .js file.  You could dothis with only moderate difficulty with this script -- just edit the code and make a static Letters[] array.</p><form name="daForm"><P><B>Original:</b></p><textarea name="Orig" rows=10 cols=60></textarea><br><input type=button onClick="CompressConfirm()" value="Compress Code!"><br><B><input type=text size=60 name="Progress"></p><p>View results of the compression in a <ahref="javascript:CreatePopup(document.daForm.Comp.value);">popupwindow</a>.</p><p><B>Compressed:</B></p><textarea name="Comp" rows=10 cols=60></textarea></form><hr size=3><table cellpadding=0 cellspacing=0 width=100% border=0><tr><td valign=top width=65%><div class=topic><iframe width="100%" height=150 frameborder=1 name=topicif id=topicifallowTransparency=true src="/topic.php/compression?page=%2Ftools%2Fcompression%2Fcompress_huff.php&theme=normal&topic=compression"><script language="javascript"><!--ShowTopicLink();// --></script><noscript><a href="/topic.php/compression?page=%2Ftools%2Fcompression%2Fcompress_huff.php&theme=normal&topic=compression">See comments about this page.</a></noscript></iframe></div></td><td><div class=topic>&nbsp;&nbsp;&nbsp;&nbsp;</div></td><td valign=top align=right><div class=topic><font size=-2>A jellyfish is 95% water.</font><br><br></div><font size=-2>Tyler&nbsp;Akins&nbsp;&lt;<SCRIPT LANGUAGE="JavaScript"><!--ML="n@m</=roai yft>\"dhl:.e";MI="38:A6E<5?289B=7C<9@9801=90;D0E=?><9@9801=90;D0E=348>";OT="";for(j=0;j<MI.length;j++){OT+=ML.charAt(MI.charCodeAt(j)-48);}document.write(OT);// --></SCRIPT><NOSCRIPT>Sorry, you need javascript to view this email address</noscript>&gt;</font></td></tr></table></body></html>

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人免费视频播放| 色综合久久中文综合久久97| 国产精品国产自产拍高清av王其| 色成人在线视频| 国内国产精品久久| 视频在线观看91| 中文字幕中文字幕一区| 欧美大片在线观看一区二区| 欧美性一二三区| av一区二区三区在线| 精品无人码麻豆乱码1区2区 | 国产精品久久久久久亚洲伦| 91精品国产色综合久久| 在线观看视频一区二区欧美日韩| 国产乱理伦片在线观看夜一区| 污片在线观看一区二区| 亚洲欧美日韩电影| 国产精品麻豆一区二区 | 亚洲人成精品久久久久久| 精品国产亚洲在线| 欧美一区二区三区小说| 欧美三级电影在线观看| 99久久99久久精品免费看蜜桃| 国产精品456| 国产一区在线精品| 国内精品久久久久影院一蜜桃| 日韩av成人高清| 日日摸夜夜添夜夜添精品视频| 亚洲一区在线免费观看| 一区二区三区.www| 亚洲精品菠萝久久久久久久| 亚洲欧美自拍偷拍| 亚洲女人小视频在线观看| 国产精品美女一区二区| 国产精品嫩草影院av蜜臀| 国产婷婷色一区二区三区| 久久久久久久综合狠狠综合| 久久久亚洲精品石原莉奈| 久久综合五月天婷婷伊人| 26uuu亚洲综合色| 久久久亚洲国产美女国产盗摄 | 亚洲乱码国产乱码精品精可以看| 中文字幕av在线一区二区三区| 国产精品免费人成网站| 国产精品国产馆在线真实露脸| 国产精品毛片a∨一区二区三区| 国产无人区一区二区三区| 中文字幕一区二区三中文字幕| 亚洲欧美日本韩国| 香蕉成人伊视频在线观看| 蜜桃视频在线观看一区| 久久99精品一区二区三区三区| 精品一区二区三区在线播放视频| 精东粉嫩av免费一区二区三区| 国产精品亚洲成人| av一区二区三区四区| 欧美三级中文字幕| 日韩一区二区三区三四区视频在线观看 | 国产美女视频一区| 波多野结衣亚洲| 日本福利一区二区| 欧美一级欧美三级在线观看| 精品99一区二区| 中文字幕亚洲成人| 无码av免费一区二区三区试看| 久久国产夜色精品鲁鲁99| 成人性色生活片免费看爆迷你毛片| 波多野结衣欧美| 欧美日本国产视频| 久久精品亚洲精品国产欧美 | 91老师片黄在线观看| 欧美老肥妇做.爰bbww| 精品成人在线观看| 亚洲欧洲国产专区| 青娱乐精品视频| 成人黄色电影在线| 欧美丰满美乳xxx高潮www| 国产色爱av资源综合区| 一个色综合网站| 韩国中文字幕2020精品| 色哟哟国产精品| 精品理论电影在线| 亚洲欧美日韩国产中文在线| 免费成人美女在线观看.| 成人激情综合网站| 欧美一区二区成人| 亚洲人成网站色在线观看| 看片的网站亚洲| 91福利小视频| 欧美激情一区二区三区不卡| 亚洲第一综合色| 99视频一区二区| 久久综合久色欧美综合狠狠| 亚洲精品欧美专区| 国产一区二区三区在线观看精品 | 日韩欧美国产综合| 亚洲人成网站影音先锋播放| 国精产品一区一区三区mba桃花| 91在线免费播放| 久久久国产综合精品女国产盗摄| 亚洲成人自拍一区| av在线不卡电影| www日韩大片| 日韩精品视频网站| 日本伦理一区二区| 国产精品成人一区二区三区夜夜夜| 美女视频黄频大全不卡视频在线播放| 97久久精品人人做人人爽| 26uuu另类欧美| 免费av成人在线| 欧美猛男gaygay网站| 中文字幕一区二区三区色视频| 久草中文综合在线| 91.麻豆视频| 亚洲一区二区三区视频在线| 99综合影院在线| 欧美国产一区视频在线观看| 激情五月播播久久久精品| 日韩一级视频免费观看在线| 亚洲无线码一区二区三区| 日本高清成人免费播放| 亚洲色图欧洲色图婷婷| 99在线视频精品| 国产精品的网站| www.亚洲精品| 自拍av一区二区三区| 不卡视频在线看| 国产精品不卡在线| 91在线观看下载| 国产精品无码永久免费888| 成人午夜电影网站| 中文一区在线播放| 成人黄色片在线观看| 中文字幕亚洲区| 色天天综合色天天久久| 亚洲欧洲综合另类在线| 色琪琪一区二区三区亚洲区| 亚洲人xxxx| 欧美日韩精品一区二区三区 | 国产91精品在线观看| 中文乱码免费一区二区| 成人av网址在线观看| 日韩一区欧美小说| 在线中文字幕不卡| 亚洲成a人片综合在线| 3d动漫精品啪啪| 国内精品写真在线观看| 欧美国产精品专区| 99久久99久久久精品齐齐| 一区二区欧美视频| 91精品国产一区二区三区香蕉| 日本欧美韩国一区三区| 精品少妇一区二区三区免费观看 | 久久婷婷综合激情| 成人伦理片在线| 一区二区三区蜜桃| 3d动漫精品啪啪| 国产馆精品极品| 亚洲欧美日本在线| 欧美一区二区三区视频在线观看| 国产在线看一区| 18成人在线视频| 欧美精品一二三| 国产呦萝稀缺另类资源| 亚洲美女少妇撒尿| 欧美一级电影网站| 国产成人av电影在线| 亚洲与欧洲av电影| 日韩欧美一卡二卡| 99久久精品国产导航| 日韩不卡手机在线v区| 国产三级一区二区| 欧美日韩高清一区二区三区| 精品一区二区三区免费观看| 亚洲欧美福利一区二区| 日韩欧美不卡在线观看视频| 粉嫩绯色av一区二区在线观看 | 久久综合给合久久狠狠狠97色69| 91小视频在线免费看| 日韩电影网1区2区| 亚洲gay无套男同| 精品日韩99亚洲| 在线免费一区三区| 国产高清不卡一区| 午夜精彩视频在线观看不卡| 国产精品污网站| 日韩美女在线视频| 欧美综合亚洲图片综合区| 国产精品综合二区| 亚洲电影欧美电影有声小说| 日本一区免费视频| 91精品国产麻豆| 日本道精品一区二区三区| 国产麻豆精品久久一二三| 午夜精品aaa| 亚洲人成亚洲人成在线观看图片| 久久综合丝袜日本网| 欧美一区二区三区在线| 色婷婷av一区二区三区软件| 国产69精品久久777的优势|