facebook / facebook/zstd

The size of compress result are very different with different size-hint

Open
#4,420 4 comments 0 reactions 1 assignee Claimed by @Cyan4973 View on GitHub
Dominant language
C
Stars
27.9k
Forks
2.6k
Avg merge
1d 3h
Merged PRs (30d)
8

Description

**Describe the bug**

The size of compress result are very different with different size-hint

**To Reproduce**

Input data is 248 KiB

[test.log](https://github.com/user-attachments/files/20896241/test.log)

```
# cat test.log |./zstd --size-hint=256000 | wc -c
40137
# cat test.log |./zstd --size-hint=64000 | wc -c
71024
```

**Expected behavior**

**Screenshots and charts**

N/A

**Desktop (please complete the following information):**
- OS: [Linux]
- Version [*** Zstandard CLI (64-bit) v1.5.8, by Yann Collet ***]
- Compiler [gcc]
- Flags [default]
- Other relevant hardware specs [Dual-core]
- Build system [Makefile]

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.