微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

js-astcompressor-prototype AST 压缩原型

程序名称:js-astcompressor-prototype

授权协议: Apache

操作系统: 跨平台

开发语言: JavaScript

js-astcompressor-prototype 介绍

js-astcompressor-prototype 是调查二进制 AST
表现方式的研究原型。此项研究能发现压缩后大小、压缩前大小、复杂度与解码速度之间的最佳平衡。

示例代码

(function (root, factory) {
  if (typeof define === 'function' && define.amd) {
    define(['exports'], factory);
  } else if (typeof exports !== 'undefined') {
    factory(exports);
  } else {
    factory((root.asmExpressionChain = {}));
  }
}(this, function (exports) {
  var BinaryPrecedences = ([
    ["*", "/", "%"],
    ["+", "-"],
    ["<<", ">>", ">>>"],
    ["<", "<=", ">", ">=", "in", "instanceof"],
    ["==", "!=", "===", "!=="],
    ["&"], ["^"], ["|"], ["&&"], ["||"]
  ]).map(function (p) {
    var result = Object.create(null);
    for (var i = 0, l = p.length; i < l; i++)
      result[p[i]] = true;
    return result;
  });

js-astcompressor-prototype 官网

https://github.com/WebAssembly/js-astcompressor-prototype

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐