• <bdo id='y915T'></bdo><ul id='y915T'></ul>
  1. <small id='y915T'></small><noframes id='y915T'>

    <i id='y915T'><tr id='y915T'><dt id='y915T'><q id='y915T'><span id='y915T'><b id='y915T'><form id='y915T'><ins id='y915T'></ins><ul id='y915T'></ul><sub id='y915T'></sub></form><legend id='y915T'></legend><bdo id='y915T'><pre id='y915T'><center id='y915T'></center></pre></bdo></b><th id='y915T'></th></span></q></dt></tr></i><div id='y915T'><tfoot id='y915T'></tfoot><dl id='y915T'><fieldset id='y915T'></fieldset></dl></div>

  2. <legend id='y915T'><style id='y915T'><dir id='y915T'><q id='y915T'></q></dir></style></legend>
    <tfoot id='y915T'></tfoot>

      在base64编码之前缩短字符串以使其更短的无损压缩方法?

      Lossless compression method to shorten string before base64 encoding to make it shorter?(在base64编码之前缩短字符串以使其更短的无损压缩方法?)
      • <i id='FA8Ks'><tr id='FA8Ks'><dt id='FA8Ks'><q id='FA8Ks'><span id='FA8Ks'><b id='FA8Ks'><form id='FA8Ks'><ins id='FA8Ks'></ins><ul id='FA8Ks'></ul><sub id='FA8Ks'></sub></form><legend id='FA8Ks'></legend><bdo id='FA8Ks'><pre id='FA8Ks'><center id='FA8Ks'></center></pre></bdo></b><th id='FA8Ks'></th></span></q></dt></tr></i><div id='FA8Ks'><tfoot id='FA8Ks'></tfoot><dl id='FA8Ks'><fieldset id='FA8Ks'></fieldset></dl></div>

          <tbody id='FA8Ks'></tbody>

          <small id='FA8Ks'></small><noframes id='FA8Ks'>

          <legend id='FA8Ks'><style id='FA8Ks'><dir id='FA8Ks'><q id='FA8Ks'></q></dir></style></legend>

            <tfoot id='FA8Ks'></tfoot>
                <bdo id='FA8Ks'></bdo><ul id='FA8Ks'></ul>
              • 本文介绍了在base64编码之前缩短字符串以使其更短的无损压缩方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                刚刚构建了一个用于预览 HTML 文档的小型 Web 应用程序,该应用程序生成的 URL:s 包含 base64 编码数据中的 HTML(以及所有内联 CSS 和 Javascript).问题是,URL:s 很快就会变得有点长.首先压缩字符串而不丢失数据的事实上的"标准方式(最好是Javascript)是什么?

                just built a small webapp for previewing HTML-documents that generates URL:s containing the HTML (and all inline CSS and Javascript) in base64 encoded data. Problem is, the URL:s quickly get kinda long. What is the "de facto" standard way (preferably by Javascript) to compress the string first without data loss?

                PS;前段时间我在学校读到关于 Huffman 和 Lempel-Ziv 的文章,我记得我真的很喜欢 LZW :)

                PS; I read about Huffman and Lempel-Ziv in school some time ago, and I remember really enjoying LZW :)

                找到解决方案;似乎 rawStr => utf8Str => lzwStr => base64Str 是要走的路.我正在进一步致力于在 utf8 和 lzw 之间实现霍夫曼压缩.到目前为止的问题是,当编码为 base64 时,太多的字符会变得很长.

                Solution found; seems like rawStr => utf8Str => lzwStr => base64Str is the way to go. I'm further working on implementing huffman compression between utf8 and lzw. Problem so far is that too many chars become very long when encoded to base64.

                推荐答案

                查看这个答案.它提到了 LZW 压缩/解压缩的功能(通过 http://jsolait.net/,特别是 http://jsolait.net/browser/trunk/jsolait/lib/codecs.js).

                Check out this answer. It mentions functions for LZW compression/decompression (via http://jsolait.net/, specifically http://jsolait.net/browser/trunk/jsolait/lib/codecs.js).

                这篇关于在base64编码之前缩短字符串以使其更短的无损压缩方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                在开发JS过程中,会经常遇到两个小数相运算的情况,但是运算结果却与预期不同,调试一下发现计算结果竟然有那么长一串尾巴。如下图所示: 产生原因: JavaScript对小数运算会先转成二进制,运算完毕再转回十进制,过程中会有丢失,不过不是所有的小数间运算会
                问题描述: 在javascript中引用js代码,然后导致反斜杠丢失,发现字符串中的所有\信息丢失。比如在js中引用input type=text onkeyup=value=value.replace(/[^\d]/g,) ,结果导致正则表达式中的\丢失。 问题原因: 该字符串含有\,javascript对字符串进行了转
                Rails/Javascript: How to inject rails variables into (very) simple javascript(Rails/Javascript:如何将 rails 变量注入(非常)简单的 javascript)
                CoffeeScript always returns in anonymous function(CoffeeScript 总是以匿名函数返回)
                Ordinals in words javascript(javascript中的序数)
                getFullYear returns year before on first day of year(getFullYear 在一年的第一天返回前一年)
                    <tbody id='awCQA'></tbody>
                  1. <tfoot id='awCQA'></tfoot>
                    • <small id='awCQA'></small><noframes id='awCQA'>

                    • <i id='awCQA'><tr id='awCQA'><dt id='awCQA'><q id='awCQA'><span id='awCQA'><b id='awCQA'><form id='awCQA'><ins id='awCQA'></ins><ul id='awCQA'></ul><sub id='awCQA'></sub></form><legend id='awCQA'></legend><bdo id='awCQA'><pre id='awCQA'><center id='awCQA'></center></pre></bdo></b><th id='awCQA'></th></span></q></dt></tr></i><div id='awCQA'><tfoot id='awCQA'></tfoot><dl id='awCQA'><fieldset id='awCQA'></fieldset></dl></div>

                          <bdo id='awCQA'></bdo><ul id='awCQA'></ul>
                          <legend id='awCQA'><style id='awCQA'><dir id='awCQA'><q id='awCQA'></q></dir></style></legend>