diff options
| author | Enzo Matsumiya <ematsumiya@suse.de> | 2025-12-05 14:28:28 -0300 |
|---|---|---|
| committer | Enzo Matsumiya <ematsumiya@suse.de> | 2026-01-21 14:30:38 -0300 |
| commit | 3feabe63584bccc7de38a4a6ff7c16752f9e9a59 (patch) | |
| tree | 6ee4e2a6a8b24b44f43738417d9d6132c443347b /scripts/Makefile.propeller | |
| parent | 9d2c26a7e1d719005a14563761e3a7d71259ef1e (diff) | |
| download | linux-3feabe63584bccc7de38a4a6ff7c16752f9e9a59.tar.gz linux-3feabe63584bccc7de38a4a6ff7c16752f9e9a59.tar.bz2 linux-3feabe63584bccc7de38a4a6ff7c16752f9e9a59.zip | |
smb: client: compress: rework is_compressible()
Biggest caller-facing change:
is_compressible() is now called from smb_compress() instead of
should_compress(); the latter only does the basic checks (write >= 4K).
Internal changes:
- has_low_entropy() computes Shannon entropy of the sampled data.
Original code was copied over from btrfs, so it carelessly used their
parameters.
Fix the calculation to use our own parameters.
Also set a more relaxed threshold since LZ77 can now handle better
hard-to-compress data.
- The above change also allows to remove calc_byte_distribution()
that did similar work (with more inaccurate results).
- Also rework on sample collection from the input (uncompressed)
buffer; instead of 'sampling', with intervals, now just reuse the
to-be-compressed buffer and run is_compressible() on 7/8 of its
original size. This runs just as fast and gives much more accurate
info.
- Remove collect_sample() and collect_step() helpers
Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de>
Diffstat (limited to 'scripts/Makefile.propeller')
0 files changed, 0 insertions, 0 deletions
