facebook / facebook/zstd

Educational decoder unable to decode real world .zst files?

Đang mở
#2,573 2 bình luận 2 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
C
Star
27.9k
Fork
2.6k
Merge trung bình
1 ngày 3 giờ
Pull request đã merge (30 ngày)
8

Mô tả

**Describe the bug**
Hello, I'm new to Zstandard. I found the educational decoder can't decode real world .zst files. I'm not sure if educational decoder is expected to decode real world `.zst` files. If I'm wrong, please point out. Thank you!

**To Reproduce**
1. Downloads [linux-5.11.12.tar.xz](https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.11.12.tar.xz) and `xz -d linux-5.11.12.tar.xz`
2. `zstd linux-5.11.12.tar`
3. Compile educational decoder: `gcc -O2 -o harness harness.c zstd_decompress.c`
4. Decode using educational decoder: `./harness linux-5.11.12.tar.zst tmp`

**Expected behavior**
Output of the educational decoder (`tmp`) is same as input (`linux-5.11.12.tar`)

**Screenshots and charts**
```
$ ../../zstd linux-5.11.12.tar
linux-5.11.12.tar : 16.72% (1064488960 => 178014949 bytes, linux-5.11.12.tar.zst)
$ gcc -O2 -o harness harness.c zstd_decompress.c
$ ./harness linux-5.11.12.tar.zst tmp
Error: Corruption detected while decompressing
$
```

**Desktop (please complete the following information):**
- OS: Ubuntu 20.04
- Compiler: gcc
- Flags: default
- Build system: Makefile

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.