Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 9 additions & 0 deletions prdoc/pr_9875.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
title: Stronger WASM compression
doc:
- audience: Runtime Dev
description: |-
Use strongest compression 22 instead of just 3. See [docs](https://docs.rs/zstd/0.13.3/zstd/stream/write/struct.Encoder.html#method.new).
Reduces our KAH compressed size by 25%.
crates:
- name: sp-maybe-compressed-blob
bump: patch
2 changes: 1 addition & 1 deletion substrate/primitives/maybe-compressed-blob/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ pub fn compress(blob: &[u8], bomb_limit: usize) -> Option<Vec<u8>> {
let mut buf = ZSTD_PREFIX.to_vec();

{
let mut v = zstd::Encoder::new(&mut buf, 3).ok()?.auto_finish();
let mut v = zstd::Encoder::new(&mut buf, 22).ok()?.auto_finish();
v.write_all(blob).ok()?;
}

Expand Down
Loading