aboutsummaryrefslogtreecommitdiff
path: root/research
diff options
context:
space:
mode:
authorEugene Kliuchnikov <eustas@google.com>2017-08-28 11:31:29 +0200
committerGitHub <noreply@github.com>2017-08-28 11:31:29 +0200
commita629289e3297bcfd25648293df3e1d6dfd59df24 (patch)
treecd6f2caf185267b717f4927bf8752eaecf269c75 /research
parent653543541319e2318d2fc572cf5c7f3275b9c12c (diff)
downloadbrotli-a629289e3297bcfd25648293df3e1d6dfd59df24.zip
brotli-a629289e3297bcfd25648293df3e1d6dfd59df24.tar.gz
brotli-a629289e3297bcfd25648293df3e1d6dfd59df24.tar.bz2
Update (#590)
* add transpiled JS decoder * make PY wrapper accept memview * fix dictionary generator * speedup compression of RLEish data
Diffstat (limited to 'research')
-rwxr-xr-xresearch/deorummolae.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/research/deorummolae.cc b/research/deorummolae.cc
index 839179d..f4cc53e 100755
--- a/research/deorummolae.cc
+++ b/research/deorummolae.cc
@@ -252,6 +252,7 @@ retry:
if (best_cost == 0 || best_isle.lcp < MIN_MATCH) {
if (min_count >= 8) {
min_count = (min_count * 7) / 8;
+ fprintf(stderr, "Retry: min_count=%d\n", min_count);
goto retry;
}
break;
@@ -261,8 +262,10 @@ retry:
fprintf(stderr,
"Savings: %zu+%zu, dictionary: %zu+%d\n",
total_cost, best_cost, total, best_isle.lcp);
- memcpy(
- dictionary + total, full_text.data() + sa[best_isle.l], best_isle.lcp);
+ for (size_t i = 0; i < best_isle.lcp; ++i) {
+ dictionary[total + i] =
+ static_cast<uint8_t>(full_text[sa[best_isle.l] + i]);
+ }
total += best_isle.lcp;
total_cost += best_cost;
cutMatch(&data, best_isle.l, best_isle.lcp, &sa, &lcp,