Skip to content

Warning message for zstd -v --train is missing line breaks #4052

@dearblue

Description

@dearblue

Describe the bug

The warning message for zstd -v --train when exceeding 128 KiB is missing line breaks.

To Reproduce

  1. Install zstd-1.5.6
  2. Change directory to zstd clone repository
  3. Enter the /usr/local/bin/zstd -v --train lib/legacy/*.c

Expected behavior

% /usr/local/bin/zstd -v --train lib/legacy/*.c
*** Zstandard CLI (64-bit) v1.5.6, by Yann Collet ***
Shuffling input files
Sample file 'lib/legacy/zstd_v04.c' is too large, limiting to 128 KB
Sample file 'lib/legacy/zstd_v06.c' is too large, limiting to 128 KB
Sample file 'lib/legacy/zstd_v07.c' is too large, limiting to 128 KB
Sample file 'lib/legacy/zstd_v05.c' is too large, limiting to 128 KB
!  Warning : data size of samples too small for target dictionary size
!  Samples should be about 100x larger than target dictionary size

...SNIP...

Screenshots and charts

% /usr/local/bin/zstd -v --train lib/legacy/*.c
*** Zstandard CLI (64-bit) v1.5.6, by Yann Collet ***
Shuffling input files
Sample file 'lib/legacy/zstd_v04.c' is too large, limiting to 128 KBSample file 'lib/legacy/zstd_v06.c' is too large, limiting to 128 KBSample file 'lib/legacy/zstd_v07.c' is too large, limiting to 128 KBSample file 'lib/legacy/zstd_v05.c' is too large, limiting to 128 KB!  Warning : data size of samples too small for target dictionary size
!  Samples should be about 100x larger than target dictionary size

...SNIP...

Desktop (please complete the following information):

  • OS: FreeBSD 14.0-RELEASE-p6
  • 🐈‍⬛

Additional context

DISPLAYLEVEL(3, "Sample file '%s' is too large, limiting to %d KB",

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions