Skip to content

Commit

Permalink
use pure rust zstd decoder at runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasf committed Dec 30, 2023
1 parent b6392d0 commit 731f419
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 27 deletions.
106 changes: 81 additions & 25 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ serde_repr = "0.1"
webpki-roots = "0.25"
thousands = "0.2"
tar = { version = "0.4", default-features = false }
zstd = { version = "0.13", default-features = false }
ruzstd = "0.5"

[target.'cfg(target_arch = "x86_64")'.dependencies]
raw-cpuid = "11"
Expand Down
2 changes: 1 addition & 1 deletion src/assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ impl Assets {
let mut stockfish = ByEngineFlavor::<Option<PathBuf>>::default();
let dir = tempfile::Builder::new().prefix("fishnet-").tempdir()?;

let mut archive = tar::Archive::new(zstd::Decoder::new(ASSETS_TAR_ZST)?);
let mut archive = tar::Archive::new(ruzstd::StreamingDecoder::new(ASSETS_TAR_ZST)?);
for entry in archive.entries()? {
let mut entry = entry?;
let path = entry.path()?;
Expand Down

0 comments on commit 731f419

Please sign in to comment.