Update to zstd 1.3.6

This commit is contained in:
Alexandre Bury 2018-10-05 11:20:11 -07:00
parent 43655c120c
commit c283d37a2d
7 changed files with 533 additions and 409 deletions

View file

@ -7,7 +7,7 @@ categories = ["compression", "api-bindings"]
license = "MIT"
name = "zstd"
repository = "https://github.com/gyscos/zstd-rs"
version = "0.4.19+zstd.1.3.5"
version = "0.4.20+zstd.1.3.6"
exclude = ["assets/**"]
readme = "Readme.md"
@ -15,7 +15,7 @@ readme = "Readme.md"
travis-ci = { repository = "gyscos/zstd-rs" }
[dependencies]
zstd-safe = { path="zstd-safe", version = "1.4.4", default-features = false }
zstd-safe = { path="zstd-safe", version = "1.4.5", default-features = false }
tokio-io = { version = "0.1", optional = true }
futures = { version = "0.1", optional = true }
@ -24,6 +24,7 @@ clap = "2.6.0"
partial-io = "^0.2.1"
quickcheck = "0.4"
humansize = "1.0"
walkdir = "2.2.5"
[features]
default = ["legacy"]

View file

@ -136,13 +136,15 @@ mod tests {
use std::io;
use std::io::Read;
extern crate walkdir;
#[test]
fn test_dict_training() {
// Train a dictionary
let paths: Vec<_> = fs::read_dir("src")
.unwrap()
let paths: Vec<_> = walkdir::WalkDir::new("src")
.into_iter()
.map(|entry| entry.unwrap())
.map(|entry| entry.path())
.map(|entry| entry.into_path())
.filter(|path| path.to_str().unwrap().ends_with(".rs"))
.collect();
@ -158,16 +160,19 @@ mod tests {
&mut ::stream::Encoder::with_dictionary(&mut buffer, 1, &dict)
.unwrap()
.auto_finish(),
).unwrap();
)
.unwrap();
let mut result = Vec::new();
io::copy(
&mut ::stream::Decoder::with_dictionary(
&buffer[..],
&dict[..],
).unwrap(),
)
.unwrap(),
&mut result,
).unwrap();
)
.unwrap();
assert_eq!(&content, &result);
}

View file

@ -1,7 +1,7 @@
[package]
authors = ["Alexandre Bury <alexandre.bury@gmail.com>"]
name = "zstd-safe"
version = "1.4.4+zstd.1.3.5"
version = "1.4.5+zstd.1.3.6"
description = "Safe low-level bindings for the zstd compression library."
keywords = ["zstd", "zstandard", "compression"]
categories = ["api-bindings", "compression"]
@ -10,7 +10,7 @@ license = "MIT/Apache-2.0"
readme = "Readme.md"
[dependencies]
zstd-sys = { path="zstd-sys", version = "1.4.4", default-features = false }
zstd-sys = { path="zstd-sys", version = "1.4.5", default-features = false }
libc = "0.2.21"
[features]

View file

@ -16,7 +16,7 @@ links = "zstd"
name = "zstd-sys"
readme = "Readme.md"
repository = "https://github.com/gyscos/zstd-rs"
version = "1.4.4+zstd.1.3.5"
version = "1.4.5+zstd.1.3.6"
[build-dependencies]
blob = "0.2.0"
@ -25,7 +25,7 @@ glob = "0.2.11"
[build-dependencies.bindgen]
optional = true
version = "0.37"
version = "0.42"
[dependencies]
libc = "0.2.21"

File diff suppressed because it is too large Load diff

@ -1 +1 @@
Subproject commit 90ae50224d15e8dbcb9fa26b9be096366733db8e
Subproject commit 4fa456d7f12f8b27bd3b2f5dfd4f46898cb31c24

View file

@ -5,7 +5,7 @@
/* This file is used to generate bindings for both headers.
* Just run the following command to generate the bindings:
bindgen zstd.h --ctypes-prefix ::libc --blacklist-type max_align_t --use-core -o src/bindings.rs -- -DZSTD_STATIC_LINKING_ONLY
bindgen zstd.h --ctypes-prefix ::libc --blacklist-type max_align_t --rustified-enum '.*' --use-core -o src/bindings.rs -- -DZSTD_STATIC_LINKING_ONLY
Or use the `bindgen` feature, which will create the bindings automatically.