int-compress-string

时间:2021-05-31 14:00:03
【文件属性】:
文件名称:int-compress-string
文件大小:57KB
文件格式:ZIP
更新时间:2021-05-31 14:00:03
JavaScript 整数压缩字符串 将以下范围内的整数数组压缩为URL安全的短字符串。 分钟 最大限度 0 Number.MAX_SAFE_INTEGER === 9007199254740991 我编写这个函数是为了在有限的 URL 查询字符串中存储大量连续的 ID(在 Internet Explorer 中最多 2048 个字符)。 压缩后,大小平均减少 80% 以上,具体取决于数据特征。 解压时,顺序不保留并进行排序。 import { compress , decompress } from "int-compress-string" ; const original = [ 0 , 1 , 2 , ...... . , 99 ] ; const compressed = compress ( ) ; //TURIZkFkOEIzd0hGQVN6ZEFRPT0= const decompr
【文件预览】:
int-compress-string-main
----.github()
--------workflows()
----src()
--------index.js(2KB)
----.npmignore(21B)
----LICENSE(1KB)
----test()
--------index.test.js(2KB)
----README.md(1KB)
----.gitignore(46B)
----package-lock.json(219KB)
----package.json(1009B)

网友评论