Can't decompress data which is compressed by rust code
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
提供されたフレームを使って zstandard.decompress 経由で失敗を再現し、その後 Rust zstd::encode_all および逆方向の Python/Rust パスと比較します。コンテンツサイズのないフレームの想定される処理を特定し、回帰テストを追加するか、必要な復号入力を文書化できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Here is simplest reproducing example:
import zstandard
zstandard.decompress(b'\x28\xb5\x2f\xfd\x00\x58\x11\x00\x00\x7b\x7d')
It raises an error: ZstdError: could not determine content size in frame header
More context
I'm trying to rewrite a client application in rust, it sends compressed data to server, then server decompresses it. Unfortunally the server failed to decompress data.
Here is how I do it in client side:
use std::io::Cursor;
use zstd;
fn main() {
let body = zstd::encode_all(Cursor::new("{}".as_bytes()), 3).unwrap();
for x in body.iter() {
print!("\\x{x:x?}");
}
}
And I copied the body and decompressed it in python, and it failed.
If I tried to compress data({} in my example) in python, and decompressed in rust, it successes. So I think it's the issue in python side.
In rust, I'm using zstd-rs for compressing/decompressing
- 主要言語
- C
- スター
- 641
- フォーク
- 117
- 平均マージ
- 1日 14時間
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
indygreg/python-zstandard のほかの issue
-
`multi_decompress_to_buffer([])` terminates the process with SIGFPE対応中かも @mikamikasuki が 7 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
indygreg/python-zstandard#335 ·
メンテナーはふだん 2 日以内に返信
-
Silent data-correctness bug: `readinto()` / `readinto1()` on `stream_reader` return `tell() == 0` after successful reads対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
indygreg/python-zstandard#295 ·
メンテナーはふだん 2 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 64/100
indygreg/python-zstandard#345 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
indygreg/python-zstandard#334 ·
メンテナーはふだん 2 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 54/100
indygreg/python-zstandard#333 ·
メンテナーはふだん 2 日以内に返信
indygreg/python-zstandard の issue をすべて見る
似ている issue
-
severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
luainkernel/lunatik#1853 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 半日 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 5 日以内に返信
-
constants.h: M_PI / M_PI_2 fallbacks cause -Wambiguous-macro when H3 is compiled as a Clang moduleオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
area:backend bug launch:p2 scope:core
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
Chelis-Lang/chelis#3494 ·
メンテナーはふだん 1 日以内に返信