Pewarta Proxy

📋 Server Request & Proxy Logs

Loading active proxy settings...
Developed by Khairul Adha (adhexa.id)
Mengambil log server...

⚙️ Pengaturan Proxy Target

Skip to content
Open
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
9e5c27f
Add _zstd stdlib module backing compression.zstd
JamesClarke7283 May 23, 2026
1def1b4
Fix iOS build by removing static PyMutex<PyTypeRef>
JamesClarke7283 May 23, 2026
ee26123
Fix clippy errors in zstd module
JamesClarke7283 May 23, 2026
fbce9c9
Retrigger CI
JamesClarke7283 May 23, 2026
63103b6
chore: format zstd module
JamesClarke7283 May 23, 2026
77370cb
Update crates/stdlib/src/zstd.rs
JamesClarke7283 May 24, 2026
ace862f
chore: remove rustdoc comments from zstd module
JamesClarke7283 May 24, 2026
07aa356
commit message
JamesClarke7283 May 25, 2026
f7598d6
commit message
JamesClarke7283 May 25, 2026
9b1e29e
Identify zstd parameter enums by type identity, not name
JamesClarke7283 Jun 3, 2026
e6c5b19
Match CPython error behavior in _zstd ZstdCompressor
JamesClarke7283 Jun 3, 2026
dbe4626
Address review: drop decorative separators and unused zstd crate
JamesClarke7283 Aug 9, 2026
9d497f4
Switch _zstd backend from zstd-safe to pure-Rust libzstd-rs-sys
JamesClarke7283 Aug 9, 2026
8fe59b8
Fix data loss in ZstdDecompressor.decompress(max_length=0)
JamesClarke7283 Aug 9, 2026
3d4825e
Drop duplicate spell-checker line in zstd.rs
JamesClarke7283 Aug 9, 2026
52bea59
Address review on _zstd constants, version attrs and dict markers
JamesClarke7283 Aug 19, 2026
1335148
Replace the _zstd flush-mode constants with a CompressMode enum
JamesClarke7283 Aug 19, 2026
68bed04
Correct the _zstd explanatory comments and raise MemoryError on OOM
JamesClarke7283 Aug 19, 2026
e163561
Fix CPython divergences and a crash in the _zstd module
JamesClarke7283 Aug 19, 2026
041f631
Restore Lib/test/test_zstd.py to its vendored CPython state
JamesClarke7283 Aug 19, 2026
2cc9547
Merge main into zstd
JamesClarke7283 Oct 31, 2026
0880de2
Fix zstd parameter errors and concurrent lock waits
JamesClarke7283 Oct 31, 2026
c588dcb
Adapt zstd bindings to current VM object APIs
JamesClarke7283 Oct 31, 2026
6751a62
Borrow the zstd module after resolving imports
JamesClarke7283 Oct 31, 2026
3541742
Simplify the default pledged zstd size
JamesClarke7283 Oct 31, 2026
5c591e7
Fix zstd CI selection and dictionary sample validation
JamesClarke7283 Oct 31, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix CPython divergences and a crash in the _zstd module
Found by reviewing the module against CPython's `Modules/_zstd/` and the
pinned libzstd-rs-sys sources; each item below was reproduced before the
fix and re-checked after.

- `train_dict`/`finalize_dict` sized their output buffer with an
  infallible `Vec::with_capacity`/`vec![]` from a caller-supplied
  `dict_size`, so `train_dict([b'x'], 2**62)` aborted the interpreter
  instead of raising. Reserve fallibly and raise `MemoryError`, as CPython
  does.
- A digested dictionary was always built at `ZSTD_CLEVEL_DEFAULT`. Since
  `ZSTD_CCtx_refCDict` takes its parameters from the CDict, that silently
  discarded the requested level: `level=19` with `as_digested_dict`
  compressed a test corpus to 39817 bytes instead of 31951. Build the
  CDict at the compressor's effective level, tracked through `level=` and
  the `options` dict like CPython's `self->compression_level`.
- A bare `ZstdDict` was loaded as digested in both directions; CPython
  compresses with an undigested dictionary by default and only
  decompresses with a digested one. Give `DictLoader` a per-direction
  default.
- Neither compressor nor decompressor reset its session after an error,
  leaving the object permanently broken — every later call failed with
  "Operation not authorized at current processing stage" or re-reported
  the original corruption on valid input. Reset as CPython's error paths
  do, including restoring `last_mode` to `FLUSH_FRAME`.
- `apply_options` range-checked every parameter, rejecting values libzstd
  and CPython accept: 0 ("use the default") for `window_log`, `strategy`,
  `window_log_max` and friends, any non-zero value for the boolean flags,
  and the clamped `nb_workers`/`job_size`/`overlap_log`. Only
  `compression_level` needs the check — libzstd clamps that one silently,
  which is why `test_compress_parameters` requires a `ValueError` — so
  everything else now goes to libzstd, whose error code already maps to
  the same message.
- `ZstdDict` accepted content shorter than 8 bytes; CPython rejects it up
  front regardless of `is_raw`.
- `compress`/`decompress` refused `data` as a keyword and
  `get_param_bounds` required `is_compress` as one, both contrary to
  CPython's clinic signatures.
- The decompressor allocated a full 128 KiB scratch buffer even when
  `max_length` capped output far below that.

`test_zstd` (119 tests) and the snippet test pass; clippy is clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
  • Loading branch information
JamesClarke7283 and claude committed Aug 19, 2026
commit e1635610b92c0336b6ad54c39814da477fadce1c
Loading