• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

actioninja / refpack-rs / 15969602071
91%
master: 92%

Build:
Build:
LAST BUILD BRANCH: refs/tags/v5.0.3
DEFAULT BRANCH: master
Ran 30 Jun 2025 09:49AM UTC
Jobs 1
Files 18
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

30 Jun 2025 09:48AM UTC coverage: 92.053% (+0.9%) from 91.159%
15969602071

push

github

web-flow
Improve compression ratio (#12)

* Update benchmarks

- add all zeros benchmark
- remove redundant benchmark
- add compressed size print

* Improve compression ratio

* fix clippy lints and format

* make number of hash chaining levels a constant

* add CompressionOptions parameter to compress functions

* add random booleans benchmark

This is a surprisingly useful benchmark, as a theoretically optimal compression algorithm will compress to a ratio of 8:1, and compression speeds tend to follow real-world usage better than the other benchmarks.

* make benchmark sizes cover a broader range

* change "fast" algorithm to use hash chaining

* add back original algorithm as "fastest"

* make optimal algorithm use a circular buffer

With this the memory usage for large data sizes is a fraction of what it used to be, but the current implementation needs to be re-optimized for this layout

* fix control bench

* formatting

* ignore optimal_matches_reference test

* remove short_skip_position

In theory it is a small algorithmic improvement, but the extra space needed for alignment and hash table pretty much completely nullify the benefit.
Removing this also simplifies the algorithm somewhat.

* change HashMap to PrefixTable

* merge duplicate search loop

* drop cost_state early

This reduces peak memory usage slightly.

* format

* refactor: rename HASH_CHAIN_MODULO to HASH_CHAIN_BUFFER_SIZE

* refactor: format

* refactor: add MPL headers to files that are missing the header

* refactor: replace commented code with a comment explaining why the code is not present

* doc: add documentation to CompressionOptions

* refactor: do not expose PrefixSearcher in the library interface

* refactor: only compile HashchainPrefixSearcher in test builds

* doc: document PrefixSearcher search function

* doc: add doc comment to encode_slice_hc

* fix: change debug_assert to assert to make sure all tests pass in release

* doc: fully comment encode_slice_hc

* doc: fully... (continued)

834 of 919 new or added lines in 12 files covered. (90.75%)

4 existing lines in 2 files now uncovered.

1529 of 1661 relevant lines covered (92.05%)

370838.14 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
98.53
src/data/compression/fast.rs
1
98.21
src/data/compression/fastest.rs
2
98.8
src/data/compression/optimal.rs
4
96.58
src/data/compression/match_length.rs
4
93.85
src/data/compression/mod.rs
20
35.48
src/data/compression/prefix_search/hash_table.rs
53
84.9
src/data/compression/prefix_search/multi_level_hash_chain.rs

Uncovered Existing Lines

Lines Coverage ∆ File
1
99.17
-0.83% src/header/mode/sim_ea.rs
3
61.84
-0.81% src/data/decompression.rs
Jobs
ID Job ID Ran Files Coverage
1 15969602071.1 30 Jun 2025 09:49AM UTC 18
92.05
GitHub Action Run
Source Files on build 15969602071
  • Tree
  • List 18
  • Changed 9
  • Source Changed 0
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • fb09c618 on github
  • Prev Build on main (#11292083037)
  • Next Build on main (#15969842384)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc