现在的位置: 首页 > 综合 > 正文

memTronic

2012年04月03日 ⁄ 综合 ⁄ 共 3641字 ⁄ 字号 评论关闭
http://hometown.aol.de/_ht_a/memtronic/

MemTronic's FREEWARE HTML/JavaScript Cruncher-Compressor
General Notes:
=============
  • NEW in v1.0 [Jul-2006]:
    - Improved the whole compressor-part again which results in even smaller output than with 0.9g!
    - Additionally the compression of bigger files (over 15 KBytes crunched) is faster than ever before!
    - DeCompression-Routine rewritten from scratch so that users with other than ISO-8859-1 charsets
      no longer should encounter any problems when using their language specific charsets!
    - Additionally decompression is a lot faster than with 0.9g in all available browsers!
    - Cruncher partly rewritten so that it should no longer cause trouble with some regular expressions!
    - Additionally crunching is a little bit faster and memory-consumption in Firefox is reduced too.
    - Fixed wrong size-reporting in Firefox which only counts carriage-returns and no line-feeds!
    - After over 2 years the former version being online it felt necessary to change the overall look too...
  • COMPRESSOR itself was tested successfully under: IE 6.0+ / Firefox 1.5.0.4 / Opera 7.22
  • CRUNCHER also crunches pure CSS files since v0.5. It seems that only a few people found that out!
  • CRUNCHED output should work in all available Browsers. (as long as the original Input worked!)
  • COMPRESSED output was tested successfully under: IE 5+ / NS 7.0 / Mozilla / Opera 7.0
  • LATEST Version available at: MemTronic's Place. For BUG-Reports or Feedback mail to: PurpleBytes
  • Here is one of my Test-Results (a real world web-application) which represents the progress:
    ==============================================================================
    CPU: Athlon XP 2,8 GHz

    Browsers:
    IE  = Internet Explorer 6.0.2900.2180.xpsp2_gdr.050301-1519
    FF = Firefox 1.5.0.4

    File size.......: 193.858 Bytes
    Crunched.....: 113.148 Bytes
    Compression: Normal

    v0.9g
    Compressed: 44.129 Bytes
    Ratio...........: 77.24%
    Time IE........: 44:51 Minutes
    Time FF.......: You don't want to compress this file in Firefox with v0.9g... believe me!
                        (Several hundred times clicking "continue" isn't that fun!!!)

    v1.0k
    Compressed: 24.964 Bytes
    Ratio...........: 87.12%
    Time IE........: 1:39 Minutes
    Time FF.......: 3:41 Minutes

    This is what I call improvement... hehe

What it is good for:
================

  • The HTML/JavaScript Cruncher (also known as squeezing):
    Removes whitespace and comments in all JavaScript-Blocks,Style-Sheet-Blocks, HTML-Blocks.
    This results in Bandwidth-Savings between 20% - 50%. (Depends on use of comments and style)
    The entire file will work like any uncrunched file. (Search-Engines and users still can parse the code)
  • The HTML/JavaScript Compressor:
    Compresses the entire file with a real compression-scheme! (Auto-DeCompression added to file)
    (detects: pure JavaScript, pure HTML/CSS or HTML/CSS mixed with JavaScript).
    This results in Bandwidth-Savings between 40% - 90%. (I still keep this statement)
    Besides the META-Tags (which are always kept untouched) the file is no longer parseable by any Search-Engine or user! (Compressing .js files is always a good idea!)
  • The HTML/JavaScript Obfuscator (not in this release):
    Obfuscates (scrambles) all JavaScript-Code so that it is no longer easily readable by human beings.
    This results in additionally reduced size (short replace) or absolutely hard to read code (long replace)
    The entire file will work like any unobfuscated file.
    (Search-Engines still can parse the HTML-code but no one can simply steal your JS-Code!)

Known Issues:
=============

  • Compression can take a lot of time for Input bigger than 15 KByte with "Hardcore"-Switch set.
  • JavaScript not ending with semicola [;] => Will be corrupted!
    (Stay Standard => Use semicola and everything should be fine)
  • META-Tags behind the HEAD-Tag (NON-Standard!) => Cause trouble!
  • Avoid the following in Strings:
    '<script' | '</script>' | '<body' | '</body>'
    split it up like: '<'+'script' or encode it like: '\x3cscript'
  • Avoid the following in multi-line comments:
    /* xyz = '*/' */ or similar constructs.
    split it up like: /* xyz = '*'+'/' */ or encode it like: '\x2a/'
  • Browser specific problems:
    - Firefox 1.0: Output gets truncated to 62500 Bytes.
    - Opera 9.0: Every 65537th Byte gets replaced by a carriage-return and line-feed.

抱歉!评论已关闭.