Data update

This commit is contained in:
Ingy döt Net 2026-02-01 16:33:20 -08:00
parent 5150844a7d
commit 4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions

View file

@ -3,11 +3,11 @@ compress: function [str][
loop 0..255 'i -> dict\[to :char i]: i
w: ""
result: new []
result: []
loop str 'c [
wc: w ++ c
if? key? dict wc -> w: wc
else [
switch key? dict wc -> w: wc
[
'result ++ dict\[w]
dict\[wc]: size dict
w: to :string c
@ -30,10 +30,10 @@ decompress: function [compressed][
result: w
loop arr 'k [
entry: ""
if? key? dict k -> entry: dict\[k]
else [
if? k = size dict -> entry: w ++ first w
else -> panic ~"Error with compressed: |k|"
switch key? dict k -> entry: dict\[k]
[
switch k = size dict -> entry: w ++ first w
-> panic ~"Error with compressed: |k|"
]
'result ++ entry
dict\[size dict]: w ++ first entry