Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"zstd -vvv" prints wrong file size #2549

Closed
dearblue opened this issue Mar 20, 2021 · 0 comments
Closed

"zstd -vvv" prints wrong file size #2549

dearblue opened this issue Mar 20, 2021 · 0 comments

Comments

@dearblue
Copy link
Contributor

Describe the bug

The size of a huge file is printed incorrectly with zstd -vvv.

To Reproduce

% truncate -s4g zero.bin

% /usr/local/bin/zstd -fvvv zero.bin
*** zstd command line interface 64-bits v1.4.8, by Yann Collet ***
set nb workers = 1
zero.bin: 0 bytes
zero.bin             :  0.00%   (4294967296 => 134676 bytes, zero.bin.zst)
zero.bin             : Completed in 4.30 sec  (cpu load : 100%)

Expected behavior

Expected:

zero.bin: 4294967296 bytes

Desktop (please complete the following information):

  • OS: FreeBSD 12.2-RELEASE-p4 GENERIC
  • Version: 1.4.8

Additional context

The reason is that it is truncated to lower 32-bit in DISPLAYLEVEL().

DISPLAYLEVEL(5, "%s: %u bytes \n", srcFileName, (unsigned)fileSize);

This can be solved by changing the display to show the value as 64-bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant