mirror of
https://github.com/facebook/zstd.git
synced 2026-04-27 23:48:16 +02:00
15f32ad74c
Split the logic for parameter adaption from the logic to update the display rate. This decouples the two updates, so changes to display updates don't affect parameter adaption. Also add a test case that checks that parameter adaption actually happens. This fixes Issue #3353, where --adapt is broken when --no-progress is passed.
15 lines
444 B
Bash
Executable File
15 lines
444 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
# Test --adapt
|
|
zstd -f file --adapt -c | zstd -t
|
|
|
|
datagen -g100M > file100M
|
|
|
|
# Pick parameters to force fast adaptation, even on slow systems
|
|
zstd --adapt -vvvv -19 --zstd=wlog=10 file100M -o /dev/null 2>&1 | grep -q "faster speed , lighter compression"
|
|
|
|
# Adaption still happens with --no-progress
|
|
zstd --no-progress --adapt -vvvv -19 --zstd=wlog=10 file100M -o /dev/null 2>&1 | grep -q "faster speed , lighter compression"
|