New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

spica

Package Overview
Dependencies
Maintainers
1
Versions
804
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spica - npm Package Compare versions

Comparing version 0.0.762 to 0.0.763

18

ascii.delta.ts

@@ -21,2 +21,3 @@ import { encode as encodeHPACK, decode as decodeHPACK } from './ascii.hpack';

SQL ServerではSCSUが使われている。
Protobufではsintが使われている。

@@ -49,4 +50,5 @@ 理論的観点から見ると汎用的な静的テーブルを使用するハフマン符号はランダム文字列も

あれど識別可能なすべての規則的文字列に同じことが当てはまり理想的なハフマン符号であっても
この理論的非効率性を免れることはない。なお文字列内での符号表の変更はヘッダや文字数などの
オーバーヘッドなしで可能である。
この理論的非効率性を免れることはない。これはハフマン符号に限らず算術符号や範囲符号に
おいても同じである。なお文字列内での符号表の変更はヘッダや文字数などのオーバーヘッドなし
で可能である。

@@ -88,2 +90,13 @@ */

ANS/FSE:
おそらくDAのような状態遷移を高度化し算術符号または範囲符号を使用するものだが
有望ではあるが理論的に主張されるほど最適でも汎用的でもなさそう。
そもそも理論的に最適に近くとも頻度分布が正しいことが前提なので単語やBase64など
事前知識により部分ごとに最適な符号表を使用するほど効率的ではないと思われる。
そしてANS/FSEはそれに適したアルゴリズムではないように見える。
エンコーディングとしては状態の初期化コストも無視できないものとなる懸念がある。
https://arxiv.org/abs/1311.2540
https://github.com/Cyan4973/FiniteStateEntropy
https://www.reddit.com/r/programming/comments/7uoqic/finite_state_entropy_made_easy/?rdt=38141
lz-string:

@@ -472,2 +485,3 @@ 圧縮アルゴリズム。

buffer |= delta;
assert(buffer >>> 8 === 0);
output += ASCII[0b1 << 7 | buffer];

@@ -474,0 +488,0 @@ }

6

ascii.huffman.ts

@@ -408,2 +408,5 @@ import { min } from './alias';

const hidx = table[code];
const hcode = codes[hidx];
let hlen = lens[hidx];
table = alignEnc(code, base, table);
switch (table) {

@@ -435,5 +438,2 @@ case ENC_TABLE_NN:

}
const hcode = codes[hidx];
let hlen = lens[hidx];
table = alignEnc(code, base, table);
base = code;

@@ -440,0 +440,0 @@ while (hlen !== 0) {

@@ -347,3 +347,3 @@ import { min } from './alias';

function build(table: (string | Tree)[], codes: Uint16Array | Uint32Array, lens: Uint8Array, charset: string) {
function build(table: (string | Tree)[], codes: Uint16Array | Uint32Array, lens: Uint8Array, charset: string): void {
assert(new Set(charset).size === 128 || charset.length === 256);

@@ -531,2 +531,5 @@ for (let i = 0; i < codes.length; ++i) {

const hidx = table[code];
const hcode = codes[hidx];
let hlen = lens[hidx];
table = alignEnc(code, base, table);
switch (table) {

@@ -541,5 +544,2 @@ case ENC_TABLE_64:

}
const hcode = codes[hidx];
let hlen = lens[hidx];
table = alignEnc(code, base, table);
base = code;

@@ -546,0 +546,0 @@ while (hlen !== 0) {

{
"name": "spica",
"version": "0.0.762",
"version": "0.0.763",
"description": "Supervisor, Coroutine, Channel, select, AtomicPromise, Cancellation, Cache, List, Queue, Stack, and some utils.",

@@ -5,0 +5,0 @@ "private": false,

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc