From f76563765952beadaba8d805a44d80a695641e94 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 28 Jun 2019 20:12:14 +0000 Subject: [PATCH 1/2] Update rand requirement from 0.6 to 0.7 Updates the requirements on [rand](https://github.com/rust-random/rand) to permit the latest version. - [Release notes](https://github.com/rust-random/rand/releases) - [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-random/rand/commits) Signed-off-by: dependabot-preview[bot] --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index b98010b..d37bfdc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ description = "Fast integer compression/decompression via SIMD bit-packing. Port crunchy = "0.2.2" [dev-dependencies] -rand = "0.6" +rand = "0.7" criterion = "0.2" [[bench]] From 742a70435e362f7d105e2dc0a065b8ad75a7c983 Mon Sep 17 00:00:00 2001 From: Trinity Pointard Date: Tue, 9 Jul 2019 19:32:30 +0200 Subject: [PATCH 2/2] add optional features to disable unused packers --- Cargo.toml | 7 +++++++ src/lib.rs | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index d37bfdc..600c201 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,6 +14,13 @@ crunchy = "0.2.2" rand = "0.7" criterion = "0.2" +[features] +bitpacker1x = [] +bitpacker4x = [] +bitpacker8x = [] + +default = ["bitpacker1x", "bitpacker4x", "bitpacker8x", ] + [[bench]] name = "bitpacking_bench" path = "src/bitpacking_bench.rs" diff --git a/src/lib.rs b/src/lib.rs index 6fa3e4d..0617baa 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -264,10 +264,16 @@ fn most_significant_bit(v: u32) -> u8 { } } +#[cfg(feature = "bitpacker1x")] mod bitpacker1x; +#[cfg(feature = "bitpacker4x")] mod bitpacker4x; +#[cfg(feature = "bitpacker8x")] mod bitpacker8x; +#[cfg(feature = "bitpacker1x")] pub use bitpacker1x::BitPacker1x; +#[cfg(feature = "bitpacker4x")] pub use bitpacker4x::BitPacker4x; +#[cfg(feature = "bitpacker8x")] pub use bitpacker8x::BitPacker8x;