commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
2adc768f4a5e567cc639c224289ec536914de48a
aspen
2021-05-26T19:12:29
fix: fix `nanorand-abi` and `nanorand-py` due to `RandomRange` changes
diff --git a/nanorand-abi/src/chacha.rs b/nanorand-abi/src/chacha.rs index 765b6a9..4f8729e 100644 --- a/nanorand-abi/src/chacha.rs +++ b/nanorand-abi/src/chacha.rs @@ -93,29 +93,29 @@ pub extern "C" fn chacha_next_bool(rng: &mut ChaCha) -> bool { /// Generate a random 8-bit unsigned integer within a specified range f...
6
28
28
f75c65c121ac3f0ba041b083a07249f5ae59e381
aspen
2021-05-26T19:09:50
feat: implement `RandomGen` for signed integers
diff --git a/nanorand-fuzz/fuzz_targets/range.rs b/nanorand-fuzz/fuzz_targets/range.rs index 18c0f83..a254a9b 100644 --- a/nanorand-fuzz/fuzz_targets/range.rs +++ b/nanorand-fuzz/fuzz_targets/range.rs @@ -2,28 +2,56 @@ use libfuzzer_sys::fuzz_target; use nanorand::{tls_rng, Rng}; -fuzz_target!(|data: (u8, u8, bool)...
2
43
15
0d86bec652cb729be51cbbfecac28d6dcf42f396
aspen
2021-05-26T18:41:30
refactor: completely rewrite `RandomRange` and `RandomGen` implementations
diff --git a/nanorand-fuzz/fuzz_targets/range.rs b/nanorand-fuzz/fuzz_targets/range.rs index 4f5ef4a..18c0f83 100644 --- a/nanorand-fuzz/fuzz_targets/range.rs +++ b/nanorand-fuzz/fuzz_targets/range.rs @@ -2,10 +2,28 @@ use libfuzzer_sys::fuzz_target; use nanorand::{tls_rng, Rng}; -fuzz_target!(|data: (u8, u8)| { - ...
3
90
157
bd66da77466a148f89b860c576408b1c9047078f
aspen
2021-05-26T16:06:49
chore: remove most `[profile]` stuff from Cargo.toml
diff --git a/Cargo.toml b/Cargo.toml index bd48f7b..a630869 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,12 +2,5 @@ members = ["nanorand", "nanorand-abi", "nanorand-py", "nanorand-bench"] default-members = ["nanorand"] -[profile.release] -opt-level = 's' -lto = true -codegen-units = 1 - [profile.bench] -lto = tr...
2
2
9
9536dd5c4fc20ab02b219b8ad6f2129942e3fa21
aspen
2021-05-26T15:57:56
fix: `RandomRange` no longer panics when lower == upper; added a fuzz target to ensure that no valid input will ever panic
diff --git a/nanorand-fuzz/Cargo.toml b/nanorand-fuzz/Cargo.toml index ce174b3..48ba404 100644 --- a/nanorand-fuzz/Cargo.toml +++ b/nanorand-fuzz/Cargo.toml @@ -10,9 +10,9 @@ edition = "2018" cargo-fuzz = true [dependencies] -libfuzzer-sys = "0.3" -nanorand = { path = ".." } -c2-chacha = "0.3" +libfuzzer-sys = "0.4...
3
21
4
9568f7bc79043d049dd370de3ab1ad94ffd5b1ae
aspen
2021-05-26T15:36:14
refactor: `TlsWyrand` now uses an `Rc<...>`
diff --git a/nanorand/src/crypto/chacha.rs b/nanorand/src/crypto/chacha.rs index 9cc7d3f..9dbb959 100644 --- a/nanorand/src/crypto/chacha.rs +++ b/nanorand/src/crypto/chacha.rs @@ -18,7 +18,7 @@ fn chacha_quarter_round(state: &mut [u32; 16], a: usize, b: usize, c: usize, d: state[b] = state[b].rotate_left(7); } -f...
8
22
16
b4f70196628bb25a1b5e5ffbd018b0f58536717c
Kogia-sima
2021-05-26T15:06:50
Fix compilation error when not specifying `wyrand` feature (#23) * fix: Fix compilation error when not specifying `wyrand` feature `tls` module requires `wyrand`, so we need `#[cfg(feature = "wyrand")]` attribute for its module * Export tls module only when `tls` feature was enabled This change contains brea...
diff --git a/nanorand/src/lib.rs b/nanorand/src/lib.rs index 6a6f07c..71cdaf2 100644 --- a/nanorand/src/lib.rs +++ b/nanorand/src/lib.rs @@ -88,6 +88,6 @@ pub mod entropy; pub mod gen; /// RNG algorithms. pub mod rand; -#[cfg(feature = "std")] +#[cfg(feature = "tls")] /// Provides a thread-local [WyRand] RNG. pub ...
1
1
1
a11cfbfa0e8a0b7f4758f0c569f3b5402e112f51
aspen
2021-02-07T16:17:16
fix: was using std instead of core in macOS.
diff --git a/nanorand/src/entropy/darwin.rs b/nanorand/src/entropy/darwin.rs index 8ada165..bd83a26 100644 --- a/nanorand/src/entropy/darwin.rs +++ b/nanorand/src/entropy/darwin.rs @@ -1,4 +1,4 @@ -use std::ffi::c_void; +use core::ffi::c_void; #[link(name = "Security", kind = "framework")] extern "C" { @@ -7,5 +7,5...
2
6
13
d2b3ba52987d6288025fab9c102541812a3e498f
aspen
2021-01-12T21:13:15
fix: Hopefully fix `RandomRange`
diff --git a/nanorand-py/Cargo.toml b/nanorand-py/Cargo.toml index e36e973..ff8ede4 100644 --- a/nanorand-py/Cargo.toml +++ b/nanorand-py/Cargo.toml @@ -19,8 +19,7 @@ default-features = false features = ["std", "wyrand", "pcg64", "chacha", "getrandom"] [dependencies.pyo3] -git = "https://github.com/PyO3/pyo3" -rev ...
2
30
10
79bdeeca90afb69c549a0c5eb31e1cf96cd13f69
aspen
2020-12-30T18:13:36
fix: Fix macOS/iOS `entropy_from_system`
diff --git a/nanorand/src/entropy/mod.rs b/nanorand/src/entropy/mod.rs index 257be74..d76c026 100644 --- a/nanorand/src/entropy/mod.rs +++ b/nanorand/src/entropy/mod.rs @@ -1,3 +1,8 @@ +#[cfg(all( + any(target_os = "macos", target_os = "ios"), + not(feature = "getrandom") +))] +pub use darwin::entropy_from_system; #[c...
1
5
0
cee036fbb010934549d4a5a8d7ec41030749ce60
Théo Degioanni
2020-12-28T19:07:44
fix: remove unused return in `entropy_from_system`, which prevented wasm32-* building (#19)
diff --git a/nanorand/src/entropy/mod.rs b/nanorand/src/entropy/mod.rs index 257be74..093bdc1 100644 --- a/nanorand/src/entropy/mod.rs +++ b/nanorand/src/entropy/mod.rs @@ -49,8 +49,8 @@ pub fn entropy_from_system(out: &mut [u8]) { target_os = "ios", windows )))] -pub fn entropy_from_system(out: &mut [u8]) -> Vec<...
1
2
2
19f45e66841590a7451a11da2ef956676f3844b6
aspen
2020-12-11T07:04:00
fix(py): having `abi3` enabled caused a compile failure
diff --git a/nanorand-py/Cargo.toml b/nanorand-py/Cargo.toml index fd2c19b..e36e973 100644 --- a/nanorand-py/Cargo.toml +++ b/nanorand-py/Cargo.toml @@ -20,8 +20,8 @@ features = ["std", "wyrand", "pcg64", "chacha", "getrandom"] [dependencies.pyo3] git = "https://github.com/PyO3/pyo3" -rev = "92b7a9736c9585883df5ec5...
1
2
2
8564cd8c9995f4e787e1cebc456395ac4c8ec8dd
Renovate Bot
2020-12-09T21:55:59
fix(deps): update rust crate zeroize to 1.2
diff --git a/nanorand/Cargo.toml b/nanorand/Cargo.toml index e26dbf3..cd125c5 100644 --- a/nanorand/Cargo.toml +++ b/nanorand/Cargo.toml @@ -20,7 +20,7 @@ chacha = [] rdseed = ["std"] [dependencies] -zeroize = { version = "1.1", optional = true, features = ["zeroize_derive"] } +zeroize = { version = "1.2", optional...
1
1
1
c8e110407f3db42d2d12906765aec455f628234f
aspen
2020-12-07T12:43:58
(cargo-release) start next development iteration 0.5.2-alpha.0
diff --git a/nanorand-py/Cargo.toml b/nanorand-py/Cargo.toml index f35636c..3b9cd48 100644 --- a/nanorand-py/Cargo.toml +++ b/nanorand-py/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "nanorand-py" description = "A Python module for nanorand" -version = "0.5.1" +version = "0.5.2-alpha.0" repository = "https://github....
1
1
1
2ccb238e8f7fe03a9bd77d5ae65d4870f36bd148
aspen
2020-12-07T12:43:58
(cargo-release) start next development iteration 0.5.2-alpha.0
diff --git a/nanorand-abi/Cargo.toml b/nanorand-abi/Cargo.toml index 5f71fd8..72e4c95 100644 --- a/nanorand-abi/Cargo.toml +++ b/nanorand-abi/Cargo.toml @@ -3,7 +3,7 @@ name = "nanorand-abi" description = "A stable C-compatible ABI for nanorand" repository = "https://github.com/aspenluxxxy/nanorand-rs" keywords = ["...
1
1
1
48cf885e59af407e5ced2b35089c27031b320fe3
aspen
2020-12-07T12:43:58
(cargo-release) start next development iteration 0.5.2-alpha.0
diff --git a/nanorand/Cargo.toml b/nanorand/Cargo.toml index 68720d2..e26dbf3 100644 --- a/nanorand/Cargo.toml +++ b/nanorand/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/aspenluxxxy/nanorand-rs" keywords = ["rand", "random", "no-std", "entropy"] categories = ["algorithms", "no-std"] readme = "../READ...
1
1
1
f7d3511e22e1769366367f3c669d87b89919b099
aspen
2020-12-07T12:42:53
chore: Bump version to 0.5.1
diff --git a/nanorand-abi/Cargo.toml b/nanorand-abi/Cargo.toml index 51c7c2a..5f71fd8 100644 --- a/nanorand-abi/Cargo.toml +++ b/nanorand-abi/Cargo.toml @@ -3,7 +3,7 @@ name = "nanorand-abi" description = "A stable C-compatible ABI for nanorand" repository = "https://github.com/aspenluxxxy/nanorand-rs" keywords = ["...
3
4
4
5ba218ac29df4786b002d7d12b47fa0c04a331f2
aspen
2020-12-07T12:33:01
fix: Fix random number generation
diff --git a/nanorand/src/gen.rs b/nanorand/src/gen.rs index 5c2f878..c83651f 100644 --- a/nanorand/src/gen.rs +++ b/nanorand/src/gen.rs @@ -101,44 +101,44 @@ impl<R: RNG> RandomRange<R> for usize { impl<R: RNG> RandomGen<R> for u32 { fn random(r: &mut R) -> Self { - (r.generate::<u64>() >> 32) as u32 + r.genera...
1
7
7
929b2f25fa1abca6ccc66500fd32c26ff7d33968
aspen
2020-12-04T21:59:40
test: Fix tests not compiling
diff --git a/tests/time_entropy.rs b/tests/time_entropy.rs index 656043b..373dba8 100644 --- a/tests/time_entropy.rs +++ b/tests/time_entropy.rs @@ -2,17 +2,19 @@ use nanorand::entropy::emergency_system_time_entropy; #[test] fn system_entropy_test() { - let test_entropy = emergency_system_time_entropy(16); - printl...
1
9
7
9e41554ee3734b72d019880a72426a1faa1e4c12
aspen
2020-10-28T01:54:12
fix: Make all tests pass.
diff --git a/src/gen.rs b/src/gen.rs index 51da161..5c2f878 100644 --- a/src/gen.rs +++ b/src/gen.rs @@ -60,16 +60,42 @@ impl<R: RNG> RandomRange<R> for u64 { } } +#[cfg(target_pointer_width = "64")] impl<R: RNG> RandomGen<R> for usize { fn random(r: &mut R) -> Self { - (r.generate::<u64>() >> (core::mem::size...
2
30
4
a6ea3f74dcb44fa53677bdf11a461efb91de1bd1
aspen
2020-10-23T01:09:50
fix: use alloc, fix no_std
diff --git a/src/entropy/mod.rs b/src/entropy/mod.rs index 9fb95de..7395462 100644 --- a/src/entropy/mod.rs +++ b/src/entropy/mod.rs @@ -1,4 +1,4 @@ -use std::time::{SystemTime, UNIX_EPOCH}; +use alloc::vec::Vec; #[cfg(all(unix, not(feature = "getrandom")))] pub use unix::entropy_from_system; @@ -7,22 +7,22 @@ pub ...
6
58
55
04b09178a9575052c8b2117154f9c3d08614a3bd
aspen
2020-10-22T08:47:03
feat: Better `RandomRange` implementations
diff --git a/src/gen.rs b/src/gen.rs index f4c8779..ce674d9 100644 --- a/src/gen.rs +++ b/src/gen.rs @@ -34,65 +34,88 @@ impl<R: RNG> RandomGen<R> for bool { } } -/// Boilerplate code for creating a RandomGen implementation for number types. -/// Uses Lemire's debiased integer multiplication method. -macro_rules! ...
1
80
57
0996908a2e025d095167046526bea455f6acf7d6
LoganDark
2020-10-19T21:46:53
perf: Make `RandomGen` implementation for `bool` more efficient
diff --git a/src/gen.rs b/src/gen.rs index 31684dc..f4c8779 100644 --- a/src/gen.rs +++ b/src/gen.rs @@ -30,13 +30,7 @@ impl<R: RNG> RandomGen<R> for char { impl<R: RNG> RandomGen<R> for bool { fn random(r: &mut R) -> bool { - let generated = r.rand(); - let mut bytes = [0u8; core::mem::size_of::<u8>()]; - byte...
1
1
7
4fc005b083873c47b8d8bdc90c182a05dda355b5
timvisee
2020-10-07T16:36:58
feat: Implement bool generator (#6) See https://github.com/aspenluxxxy/nanorand-rs/issues/6
diff --git a/src/gen.rs b/src/gen.rs index 14e6de1..31684dc 100644 --- a/src/gen.rs +++ b/src/gen.rs @@ -28,7 +28,19 @@ impl<R: RNG> RandomGen<R> for char { } } -/// Boilerplate code for creating a RandomGen implementation for number types. +impl<R: RNG> RandomGen<R> for bool { + fn random(r: &mut R) -> bool { +...
1
13
1
6ce857838e2ee5209995f25c1bb38ca394debb35
John-John Tedro
2020-09-23T13:16:34
link RtlGenRandom and don't include modules when getrandom is enabled (#4)
diff --git a/src/entropy/mod.rs b/src/entropy/mod.rs index d92ee54..9fb95de 100644 --- a/src/entropy/mod.rs +++ b/src/entropy/mod.rs @@ -9,15 +9,15 @@ pub use windows_uwp::entropy_from_system; /// A 100% safe entropy generator, using (in order of priority) `/dev/urandom`, /// `/dev/random`, or the system time. -#[c...
2
4
3
7076fbd7322f40730524fa99574b0b7d5de457ab
aspen
2020-09-23T02:15:38
feat: Use `RtlGenRandom` on non-UWP windows
diff --git a/src/entropy/mod.rs b/src/entropy/mod.rs index c654749..d92ee54 100644 --- a/src/entropy/mod.rs +++ b/src/entropy/mod.rs @@ -1,15 +1,24 @@ +use std::time::{SystemTime, UNIX_EPOCH}; + +#[cfg(all(unix, not(feature = "getrandom")))] +pub use unix::entropy_from_system; +#[cfg(all(windows, not(target_vendor = "u...
7
66
39
0224ccd9b7b255aa169701efffdfd5b33f3c1e14
aspen
2020-09-22T21:00:48
fix: Fix wasm compilation with getrandom
diff --git a/Cargo.toml b/Cargo.toml index ab9db5c..7f002cb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/aspenluxxxy/nanorand-rs" keywords = ["rand", "random", "no-std", "entropy"] categories = ["algorithms", "no-std"] readme = "README.md" -version = "0.4.1" +version = "0...
1
2
2
0c9917d92b8a4ebca4bc103404416a9440991852
aspen
2020-09-19T19:05:01
Make the range generation actually work.
diff --git a/src/gen.rs b/src/gen.rs index c9a62db..9f26dce 100644 --- a/src/gen.rs +++ b/src/gen.rs @@ -31,7 +31,7 @@ impl<R: RNG> RandomGen<R> for char { /// Boilerplate code for creating a RandomGen implementation for number types. /// Uses Lemire's debiased integer multiplication method. macro_rules! randomgen...
2
38
23
04024741243b3f1bebc818bad9d1d1c223eeaa2e
aspen
2020-09-19T18:40:48
Make the integer range generation better.
diff --git a/src/gen.rs b/src/gen.rs index 554088c..c9a62db 100644 --- a/src/gen.rs +++ b/src/gen.rs @@ -31,35 +31,68 @@ impl<R: RNG> RandomGen<R> for char { /// Boilerplate code for creating a RandomGen implementation for number types. /// Uses Lemire's debiased integer multiplication method. macro_rules! randomg...
1
46
13
a1202b010f6d4304906712bfdf02abaeaf084551
aspen
2020-09-19T07:54:31
Use a Fisher-Yates shuffle, rather than our own bullshit
diff --git a/src/rand/mod.rs b/src/rand/mod.rs index ee62bb1..7dc3629 100644 --- a/src/rand/mod.rs +++ b/src/rand/mod.rs @@ -1,18 +1,18 @@ -/// Implementation of the wyrand PRNG algorithm. +/// Implementation of the wyrand PRNG algorithm. /// More details can be seen at https://github.com/wangyi-fudan/wyhash #[cfg(...
1
9
27
1353863516d1ced197baa0f43818e57125f5c62e
aspen
2020-09-15T19:48:10
Fix Pcg64; add tests
diff --git a/Cargo.toml b/Cargo.toml index ea1373d..9d9fa6f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,6 +30,7 @@ rand_pcg = "^0.2" random-fast-rng = "^0.1" fastrand = "^1.3" wyhash = "^0.4" +hex = "^0.4" [[bench]] name = "randbench" diff --git a/src/entropy/mod.rs b/src/entropy/mod.rs index bc24349..de0546...
6
78
30
49e4b1bbc43c7d089417911b8f0c3b2da9a261d4
aspen
2020-09-13T20:49:31
Actually use
diff --git a/src/lib.rs b/src/lib.rs index df12dd4..66ced29 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,4 @@ +#![cfg_attr(not(feature = "std"), no_std)] #![cfg_attr(windows, deny(unsafe_code))] #![cfg_attr(not(windows), forbid(unsafe_code))]
1
1
0
25b02d791bd06a4336b1e43b31efcfaae69bc95e
aspen
2020-09-13T02:58:02
Fix criterion features for stable compat.
diff --git a/Cargo.toml b/Cargo.toml index df245ec..beda7c7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ pcg64 = [] chacha = [] [dev-dependencies] -criterion = { version = "0.3", features = ["real_blackbox"] } +criterion = "0.3" [[bench]] name = "randbench"
1
1
1
5ee3a72cb74ee0c4ad6725648c9111a5fb55e674
aspen
2020-09-12T22:18:16
Start on ChaCha20.
diff --git a/Cargo.toml b/Cargo.toml index 1b188bd..7d31fb6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,10 +11,11 @@ edition = "2018" license = "Zlib" [features] -default = ["std", "wyrand", "pcg64"] +default = ["std", "wyrand", "pcg64", "chacha"] std = [] wyrand = [] pcg64 = [] +chacha = [] [dev-dependen...
8
200
3
234f23a9d94652769c1c2245d6af4d32c4dbf2c5
aspen
2020-09-12T18:30:48
Entropy rework!
diff --git a/benches/randbench.rs b/benches/randbench.rs index 3e04add..1058daf 100644 --- a/benches/randbench.rs +++ b/benches/randbench.rs @@ -2,20 +2,34 @@ use criterion::{black_box, criterion_group, criterion_main, Criterion, Throughpu use nanorand::rand::{Pcg64, WyRand, RNG}; fn criterion_benchmark(c: &mut Cri...
6
117
48
8020d0d626236d2fece40af1d289059a74bbfb5a
aspen
2020-09-12T04:20:43
Benchmark improvements.
diff --git a/Cargo.toml b/Cargo.toml index b4bfb05..1b188bd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://github.com/aspenluxxxy/nanorand-rs" keywords = ["rand", "random", "no-std", "entropy"] categories = ["algorithms", "no-std"] readme = "README.md" -version = "0.2.2" +version = "0...
3
27
15
d6d42d9104e977417bab57681472b5faba4b71b1
aspen
2020-09-11T21:38:29
Fix the RandomGen macro a bit.
diff --git a/src/gen.rs b/src/gen.rs index 9ae8ae5..6f7ec02 100644 --- a/src/gen.rs +++ b/src/gen.rs @@ -11,12 +11,12 @@ pub trait RandomGen<R: RNG> { /// Boilerplate code for creating a RandomGen implementation for number types. macro_rules! randomgen_number { - ($($number:tt),*) => { + ($($number:ty),*) => ...
1
2
2
f1d2d377ba14ed8bf1618b5f581c45842569901b
aspen
2020-09-11T01:15:07
Fix error when compiling without `atomics`.
diff --git a/src/rand/mod.rs b/src/rand/mod.rs index 5103e33..abd6e46 100644 --- a/src/rand/mod.rs +++ b/src/rand/mod.rs @@ -10,7 +10,9 @@ pub mod pcg64; #[cfg(feature = "pcg64")] pub use pcg64::Pcg64; +#[cfg(feature = "atomics")] use crate::RNG_STATE_GLOBAL; +#[cfg(feature = "atomics")] use core::sync::atomic::O...
1
2
0
302dcf945c5bd73d87fa54afa0fca5480a8d85b7
aspen
2020-09-10T18:29:16
Add documentation.
diff --git a/Cargo.toml b/Cargo.toml index cca776d..d3340b0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "nanorand" description = "A tiny, fast, zero-dep library for random number generation." -repository = "https://github.com/aspenluxxxy/nanorand" +repository = "https://github.com/asp...
8
20
2
287dbd063a53738917f1078192185839215d10a0
Patrick Marks
2025-01-07T09:23:13
safety note & bump version
diff --git a/Cargo.toml b/Cargo.toml index 4cd7c6a..b88e2f4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "lz4" license = "MIT" -version = "1.28.0" +version = "1.28.1" readme = "README.md" authors = [ "Jens Heyens <jens.heyens@ewetel.net>", "Artem V. Navrotskiy <bozaro@buzzsoft.ru>", "P...
2
4
1
5ac408b53d01eddf771356d834f8441d8dbc2219
Meng Zhuo
2025-01-07T09:18:05
explicity on riscv64 march (#57) Gcc require explicity on ISA subset ``` cargo:warning=gcc: error: '-march=rv64': first ISA subset must be 'e', 'i' or 'g' ``` Ref: https://gitlab.alpinelinux.org/mengzhuo/aports/-/jobs/1630520
diff --git a/lz4-sys/build.rs b/lz4-sys/build.rs index a4b43ed..6b8df65 100644 --- a/lz4-sys/build.rs +++ b/lz4-sys/build.rs @@ -25,6 +25,10 @@ fn run() -> Result<(), Box<dyn Error>> { .opt_level(3); let target = get_from_env("TARGET")?; + if target.contains("riscv64") { + // riscv64 require e...
1
4
0
53cc45e5a338e29ff0f7e3ef3d152f4d624cca96
Chris Macklin
2025-01-07T09:17:22
Conditionally mark Decoder as Sync. (#58)
diff --git a/src/decoder.rs b/src/decoder.rs index f35af43..58a9ac8 100644 --- a/src/decoder.rs +++ b/src/decoder.rs @@ -20,6 +20,9 @@ pub struct Decoder<R> { next: usize, } +// No interior mutability, so Decoder is Sync as long as R is Sync. +unsafe impl<R: Read + Sync> Sync for Decoder<R> {} + impl<R: Read> ...
1
3
0
5f52707d2e9b3c7f6a1a3e95180c00e7a6204d21
Patrick Marks
2024-09-26T11:51:20
bump version
diff --git a/Cargo.toml b/Cargo.toml index 292b452..4cd7c6a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "lz4" license = "MIT" -version = "1.27.0" +version = "1.28.0" readme = "README.md" authors = [ "Jens Heyens <jens.heyens@ewetel.net>", "Artem V. Navrotskiy <bozaro@buzzsoft.ru>", "P...
1
1
2
78faf0cb080a5e534a6be1a950cdefb7ee90bee8
Miles Granger
2024-09-26T11:15:45
Add wasm-shim for emscripten target (#51)
diff --git a/lz4-sys/build.rs b/lz4-sys/build.rs index 025b708..a4b43ed 100644 --- a/lz4-sys/build.rs +++ b/lz4-sys/build.rs @@ -40,7 +40,9 @@ fn run() -> Result<(), Box<dyn Error>> { } } } - let need_wasm_shim = target == "wasm32-unknown-unknown" || target.starts_with("wasm32-wasi"); + ...
1
3
1
14267fa6e929639274344a02841120fe2f52b705
Patrick Marks
2024-09-26T11:14:05
fix ability to disable block checksumming (#55) * fix to disable block checksumming
diff --git a/src/encoder.rs b/src/encoder.rs index 0c9fe2b..974117b 100644 --- a/src/encoder.rs +++ b/src/encoder.rs @@ -39,7 +39,7 @@ impl EncoderBuilder { block_size: BlockSize::Default, block_mode: BlockMode::Linked, checksum: ContentChecksum::ChecksumEnabled, - bloc...
1
2
2
aa3054eb35f81f069e9cb6365fb831e7510465c0
Patrick Marks
2024-09-26T11:12:55
make sure to exhaust any un-read bytes held within lz4 context (#54) * make sure to return any un-read bytes held within lz4 context
diff --git a/src/decoder.rs b/src/decoder.rs index c13e3b1..f35af43 100644 --- a/src/decoder.rs +++ b/src/decoder.rs @@ -69,13 +69,13 @@ impl<R: Read> Read for Decoder<R> { self.next }; self.len = self.r.read(&mut self.buf[0..need])?; - if self.len =...
1
46
4
0794b4a57198a8743ff9fcb1a244ec6247a0aaf8
Patrick Marks
2024-09-26T09:31:02
truncate decompressed buffer in block::decompress (#53)
diff --git a/src/block/mod.rs b/src/block/mod.rs index c17384b..3b88901 100644 --- a/src/block/mod.rs +++ b/src/block/mod.rs @@ -218,7 +218,8 @@ pub fn decompress(src: &[u8], uncompressed_size: Option<i32>) -> Result<Vec<u8>> let mut buffer = vec![0u8; size]; - decompress_to_buffer(src, uncompressed_size, &...
1
14
1
85a909fadf0739a93309927a190d4251421b6edd
Patrick Marks
2024-09-26T07:59:11
switch to putting the lz4 version into metadata
diff --git a/Cargo.toml b/Cargo.toml index 5eae413..292b452 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,8 @@ test = false doc = false [dependencies] -lz4-sys = { path = "lz4-sys", version = "1.11.0" } +lz4-sys = { path = "lz4-sys", version = "1.11.1+lz4-1.10.0" } [dev-dependencies] rand = ">=0.7, <=0....
2
3
2
1030e3d27567a24067c367c20c5e9b5e633cf0f8
Patrick Marks
2024-09-13T08:51:46
prep release
diff --git a/Cargo.toml b/Cargo.toml index 63a2572..5eae413 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ test = false doc = false [dependencies] -lz4-sys = { path = "lz4-sys", version = "1.10.0" } +lz4-sys = { path = "lz4-sys", version = "1.11.0" } [dev-dependencies] rand = ">=0.7, <=0.8" diff --g...
2
4
4
f949c6427f1d44b609d790a66ec86dfd5c377fde
Patrick Marks
2024-09-13T08:47:58
bump version
diff --git a/Cargo.toml b/Cargo.toml index 71b90e6..63a2572 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "lz4" license = "MIT" -version = "1.26.0" +version = "1.27.0" readme = "README.md" authors = [ "Jens Heyens <jens.heyens@ewetel.net>", "Artem V. Navrotskiy <bozaro@buzzsoft.ru>", "P...
1
1
1
d47f2a0137a13d3da4570055d78c8862f8a6ad10
Patrick Marks
2024-09-13T08:47:23
drop docmatic
diff --git a/Cargo.toml b/Cargo.toml index 54d68a7..71b90e6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,4 +19,3 @@ lz4-sys = { path = "lz4-sys", version = "1.10.0" } [dev-dependencies] rand = ">=0.7, <=0.8" -docmatic = "0.1" diff --git a/src/lib.rs b/src/lib.rs index 7667063..45bf6e3 100644 --- a/src/lib.rs +++...
3
2
7
edd20f46926b4ab7d1844a20d5f25cc89b9fa20b
Patrick Marks
2024-06-11T05:33:45
Add content_size (#44) * Attempt to add content_size. * update Lz4FrameInfo to match lz4, and test setting content_size * fmt --------- Co-authored-by: opq <achriste@hawaii.edu>
diff --git a/lz4-sys/src/lib.rs b/lz4-sys/src/lib.rs index 5a4bca9..6804f6d 100644 --- a/lz4-sys/src/lib.rs +++ b/lz4-sys/src/lib.rs @@ -5,7 +5,7 @@ extern crate libc; target_arch = "wasm32", not(any(target_env = "wasi", target_os = "wasi")) )))] -use libc::{c_void, c_char, c_uint, size_t, c_int}; +use libc:...
2
76
7
64a55b5f08e3ade6cee8bace90beadd345fc05dc
REDxEYE
2024-04-30T13:01:40
Fix argument names and make dictionary an immutable ptr
diff --git a/lz4-sys/src/lib.rs b/lz4-sys/src/lib.rs index e9d1070..5a4bca9 100644 --- a/lz4-sys/src/lib.rs +++ b/lz4-sys/src/lib.rs @@ -372,9 +372,9 @@ extern "C" { // int LZ4_setStreamDecode (LZ4_streamDecode_t* LZ4_streamDecode, // const char* dictionary, // ...
1
3
3
df1d7dfc997db74977b61152abb452a92327cfd8
REDxEYE
2024-04-30T12:55:07
Add LZ4_setStreamDecode
diff --git a/lz4-sys/src/lib.rs b/lz4-sys/src/lib.rs index e16b091..e9d1070 100644 --- a/lz4-sys/src/lib.rs +++ b/lz4-sys/src/lib.rs @@ -369,6 +369,14 @@ extern "C" { // int LZ4_freeStream(LZ4_stream_t* LZ4_streamPtr) pub fn LZ4_freeStream(LZ4_stream: *mut LZ4StreamEncode) -> c_int; + // int LZ4_setStrea...
1
8
0
1c3323ccd0965d1f655a493dd4af3e038e496615
Stephan Seitz
2023-10-02T22:38:04
docs: fix doc string for `Decoder::new` The docstring from `Decoder::new` seems come originally from the encoder
diff --git a/src/decoder.rs b/src/decoder.rs index bb24265..c13e3b1 100644 --- a/src/decoder.rs +++ b/src/decoder.rs @@ -21,8 +21,8 @@ pub struct Decoder<R> { } impl<R: Read> Decoder<R> { - /// Creates a new encoder which will have its output written to the given - /// output stream. The output stream can be ...
1
2
2
deb7cf8ff7340108bc0714231a5ce222bae46209
Kastixx
2023-01-16T11:10:53
Tiny documentation fix on lz4::block::compress_to_buffer A couple of small fixes on doc comment of `lz4::block::compress_to_buffer`: * mentioned maximum buffer length * fixed a typo
diff --git a/src/block/mod.rs b/src/block/mod.rs index 7f64db8..c17384b 100644 --- a/src/block/mod.rs +++ b/src/block/mod.rs @@ -95,7 +95,8 @@ pub fn compress(src: &[u8], mode: Option<CompressionMode>, prepend_size: bool) - /// /// # Errors /// Returns std::io::Error with ErrorKind::InvalidInput if the src buffer is...
1
2
1
3236b4ba4235c4e124dd774a515761535cd613ab
tison
2022-11-20T10:20:06
Manually impl Defaut for CompressionMode Signed-off-by: tison <wander4096@gmail.com>
diff --git a/src/block/mod.rs b/src/block/mod.rs index 003dd45..7f64db8 100644 --- a/src/block/mod.rs +++ b/src/block/mod.rs @@ -23,17 +23,22 @@ use super::liblz4::*; use std::io::{Error, ErrorKind, Result}; /// Represents the compression mode do be used. -#[derive(Default, Clone, Copy, Debug)] +#[derive(Clone, Cop...
1
7
2
05358339ad17fb9df3501e05d95a6ed61e4cb186
tison
2022-11-20T10:12:48
Derive Default for CompressionMode
diff --git a/src/block/mod.rs b/src/block/mod.rs index 430124a..003dd45 100644 --- a/src/block/mod.rs +++ b/src/block/mod.rs @@ -23,13 +23,14 @@ use super::liblz4::*; use std::io::{Error, ErrorKind, Result}; /// Represents the compression mode do be used. -#[derive(Clone, Copy, Debug)] +#[derive(Default, Clone, Cop...
1
2
1
d4d96148f4d4a6ddc116598770736212c1eb666e
tison
2022-11-15T18:19:52
Derive Clone and Copy for CompressionMode This is a data model. Derive proper features to be used easily downstream.
diff --git a/src/block/mod.rs b/src/block/mod.rs index 620926a..430124a 100644 --- a/src/block/mod.rs +++ b/src/block/mod.rs @@ -23,7 +23,7 @@ use super::liblz4::*; use std::io::{Error, ErrorKind, Result}; /// Represents the compression mode do be used. -#[derive(Debug)] +#[derive(Clone, Copy, Debug)] pub enum Com...
1
1
1
1858677f0df73439743b8b44310cf0680a9047cf
Josh Lind
2022-07-28T16:46:08
Export include directory for header locations.
diff --git a/lz4-sys/build.rs b/lz4-sys/build.rs index 8e8e019..c69d257 100644 --- a/lz4-sys/build.rs +++ b/lz4-sys/build.rs @@ -62,6 +62,7 @@ fn run() -> Result<(), Box<dyn Error>> { } } println!("cargo:root={}", dst.display()); + println!("cargo:include={}", include.display()); Ok(()) }
1
1
0
0ddace7c22e2e33cefdc0c90ff903cbbdea9d6e5
Patrick Marks
2022-03-06T00:33:02
add test for favor_dec_speed, run fmt
diff --git a/src/block/mod.rs b/src/block/mod.rs index 7e7ca2a..620926a 100644 --- a/src/block/mod.rs +++ b/src/block/mod.rs @@ -33,7 +33,7 @@ pub enum CompressionMode { DEFAULT, } -/// Returns the size of the buffer that is guaranteed to hold the result of +/// Returns the size of the buffer that is guarantee...
2
41
15
dcb1e5d7352a199f08ce51be214692c2c0bbb4db
Patrick Marks
2022-03-06T00:20:32
bump crate versions and widen rand version range
diff --git a/Cargo.toml b/Cargo.toml index 2662d5e..ba276d0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "lz4" license = "MIT" -version = "1.23.2" +version = "1.23.3" readme = "README.md" authors = [ "Jens Heyens <jens.heyens@ewetel.net>", "Artem V. Navrotskiy <bozaro@buzzsoft.ru>", "P...
2
4
4
768be51145297357e5bca98e6bc3bc57a85c914b
Patrick Marks
2022-03-06T00:17:16
[de]compress_to_buffer methods to allow reusing buffers. Fixes #16
diff --git a/src/block/mod.rs b/src/block/mod.rs index 0ff1071..7e7ca2a 100644 --- a/src/block/mod.rs +++ b/src/block/mod.rs @@ -33,6 +33,24 @@ pub enum CompressionMode { DEFAULT, } +/// Returns the size of the buffer that is guaranteed to hold the result of +/// compressing `uncompressed_size` bytes of in dat...
1
136
18
5a919122bec51e493ea840701af04bf698c3c4f1
Malloc Voidstar
2022-03-02T19:52:37
Add support for favoring decompression speed Breaking change for lz4-sys due to changing public fields in a public struct
diff --git a/lz4-sys/src/lib.rs b/lz4-sys/src/lib.rs index 45c00ac..e16b091 100644 --- a/lz4-sys/src/lib.rs +++ b/lz4-sys/src/lib.rs @@ -89,7 +89,8 @@ pub struct LZ4FPreferences { pub frame_info: LZ4FFrameInfo, pub compression_level: c_uint, // 0 == default (fast mode); values above 16 count as 16 pub au...
2
13
2
5a24f8de80abd388904da22f14953ccb0c4da4d1
Malloc Voidstar
2022-03-02T21:45:21
Add Debug derives
diff --git a/lz4-sys/src/lib.rs b/lz4-sys/src/lib.rs index 02f9281..7f98444 100644 --- a/lz4-sys/src/lib.rs +++ b/lz4-sys/src/lib.rs @@ -26,19 +26,19 @@ use std::os::raw::{c_void, c_char, c_uint, c_int}; #[allow(non_camel_case_types)] type size_t = usize; -#[derive(Clone, Copy)] +#[derive(Clone, Copy, Debug)] #[re...
4
17
6
c3f063ef3ef326879df02a65183c1a18f3e3ff9a
analyzeDFIR
2021-07-06T04:34:43
CRT_STATIC should be an optional env variable
diff --git a/lz4-sys/build.rs b/lz4-sys/build.rs index 86c1551..8e8e019 100644 --- a/lz4-sys/build.rs +++ b/lz4-sys/build.rs @@ -29,12 +29,15 @@ fn run() -> Result<(), Box<dyn Error>> { if target == "i686-pc-windows-gnu" { // Disable auto-vectorization for 32-bit MinGW target. compile...
1
9
6
a4e08b3e6eb9e4e404f3b8c59b373fced84b4e42
analyzeDFIR
2021-07-03T22:08:38
Add support for static compilation on Windows in build script for lz4-sys crate
diff --git a/lz4-sys/build.rs b/lz4-sys/build.rs index bd591ad..86c1551 100644 --- a/lz4-sys/build.rs +++ b/lz4-sys/build.rs @@ -1,8 +1,8 @@ extern crate cc; -use std::{env, fs, process}; use std::error::Error; use std::path::PathBuf; +use std::{env, fs, process}; fn main() { match run() { @@ -23,15 +23,19...
1
25
13
0279fa8613ea028cd18a00fcaa3c52bdaee159c6
Ron Cohen
2021-04-21T15:03:39
adding LZ4F_resetDecompressionContext
diff --git a/lz4-sys/src/lib.rs b/lz4-sys/src/lib.rs index 02f9281..68d328e 100644 --- a/lz4-sys/src/lib.rs +++ b/lz4-sys/src/lib.rs @@ -380,6 +380,13 @@ extern "C" { // int LZ4_freeStreamDecode(LZ4_streamDecode_t* LZ4_stream) pub fn LZ4_freeStreamDecode(LZ4_stream: *mut LZ4StreamDecode) -> c_int; + // L...
1
7
0
730a83d438e273f5d0b898791a1ba206976a7514
alecmocatta
2020-07-19T21:13:58
libc doesn't define C types for non-WASI wasm, so define them manually
diff --git a/lz4-sys/src/lib.rs b/lz4-sys/src/lib.rs index de70442..02f9281 100644 --- a/lz4-sys/src/lib.rs +++ b/lz4-sys/src/lib.rs @@ -1,8 +1,31 @@ #![no_std] extern crate libc; +#[cfg(not(all( + target_arch = "wasm32", + not(any(target_env = "wasi", target_os = "wasi")) +)))] use libc::{c_void, c_char, c_...
5
45
3
80d36b2a2c0887188ed020a7113ffc1f4456846d
Marat Radchenko
2020-06-13T09:43:19
Update dependencies
diff --git a/Cargo.toml b/Cargo.toml index 19f1313..2662d5e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,9 +15,9 @@ test = false doc = false [dependencies] -libc = "0.2.44" +libc = "0.2" lz4-sys = { path = "lz4-sys", version = "1.9.2" } [dev-dependencies] -rand = "0.6.1" +rand = "0.7" docmatic = "0.1"
1
2
2
8d616a0342c1fea59ee3a1beb41b98c956b1f113
Patrick Marks
2020-06-07T21:25:13
2018 style
diff --git a/tests/docmatic.rs b/tests/docmatic.rs index 881d572..51ec7d7 100644 --- a/tests/docmatic.rs +++ b/tests/docmatic.rs @@ -1,4 +1,4 @@ -extern crate docmatic; +use docmatic; #[test] fn test_readme() {
1
1
1
3c8bc91785d06f6944a5b8efe37d1b6b63c1fe03
Patrick Marks
2020-05-06T22:36:19
update lz4-sys version
diff --git a/lz4-sys/Cargo.toml b/lz4-sys/Cargo.toml index 425d38f..ef06e33 100644 --- a/lz4-sys/Cargo.toml +++ b/lz4-sys/Cargo.toml @@ -2,7 +2,7 @@ name = "lz4-sys" license = "MIT" links = "lz4" -version = "1.8.3" +version = "1.9.2" authors = [ "Jens Heyens <jens.heyens@ewetel.net", "Artem V. Navrotskiy <bozaro@bu...
1
1
1
64d79c77ca7c07bd2f25d92a2003a1654b0ac131
Patrick Marks
2020-05-06T21:47:24
fix some small clippy lints
diff --git a/Cargo.toml b/Cargo.toml index 658e52d..071600b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,4 +20,4 @@ lz4-sys = { path = "lz4-sys", version = "1.8.3" } [dev-dependencies] rand = "0.6.1" -docmatic = "0.1" \ No newline at end of file +docmatic = "0.1" diff --git a/src/block/mod.rs b/src/block/mod.rs ...
4
21
28
86f3af1be590b5a1491fb7b61a4e131b49295f23
Patrick Marks
2020-05-06T21:39:54
move to 2018 edition, switch from try! to ?
diff --git a/Cargo.toml b/Cargo.toml index b8d1446..658e52d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,6 +7,7 @@ authors = [ "Jens Heyens <jens.heyens@ewetel.net>", "Artem V. Navrotskiy <bozaro description = "Rust LZ4 bindings library." repository = "https://github.com/bozaro/lz4-rs" documentation = "https://boz...
7
41
40
2fc7018c5a0a16f55b13753f0be6396c9215cce7
Patrick Marks
2020-05-06T15:08:46
fmt to make CI happy
diff --git a/src/bin/lz4.rs b/src/bin/lz4.rs index 99c41b0..e76e6b4 100644 --- a/src/bin/lz4.rs +++ b/src/bin/lz4.rs @@ -16,7 +16,8 @@ fn main() { decompress( &Path::new(arg), &Path::new(&arg[0..arg.len() - suffix.len()]), - ).unwrap(); + ) + ...
3
7
4
64eaaaa8a4ff7f2655df84e30b7bce9c586777f7
Nikhil Benesch
2019-10-28T19:46:56
Don't panic in lz4-sys build script Print errors on stderr instead.
diff --git a/lz4-sys/build.rs b/lz4-sys/build.rs index 90c48d5..bd591ad 100644 --- a/lz4-sys/build.rs +++ b/lz4-sys/build.rs @@ -1,9 +1,20 @@ extern crate cc; -use std::{env, fs}; +use std::{env, fs, process}; +use std::error::Error; use std::path::PathBuf; fn main() { + match run() { + Ok(()) => (), +...
1
30
9
e3e0718e59810592875e71d13db1fcb636208963
Giovanni Bajo
2018-12-25T10:06:30
Switch to docmatic for testing README. Similar to skpetic, but it does not add itself as a build dependency, which means that all downstream users of LZ4 don't need to build skeptic (and all its dependencies). See https://github.com/budziq/rust-skeptic/issues/60.
diff --git a/Cargo.toml b/Cargo.toml index a2f26d3..b8d1446 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,6 @@ license = "MIT" version = "1.23.1" readme = "README.md" authors = [ "Jens Heyens <jens.heyens@ewetel.net>", "Artem V. Navrotskiy <bozaro@buzzsoft.ru>" ] -build = "build.rs" description = "Rust LZ4 bi...
4
7
11
5892a7c0459ab08a318f23633259505e4899d95a
Jens Heyens
2018-11-28T17:07:08
Update dependencies from crates.io
diff --git a/Cargo.toml b/Cargo.toml index 91d6ac8..a2f26d3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "lz4" license = "MIT" -version = "1.23.0" +version = "1.23.1" readme = "README.md" authors = [ "Jens Heyens <jens.heyens@ewetel.net>", "Artem V. Navrotskiy <bozaro@buzzsoft.ru>" ] ...
3
9
8
dc0a393e015a8c1a8cf11b2b35b69dea3304f707
Jens Heyens
2018-10-12T10:09:51
use c_char instead of specific byte type for lz4-sys compatibility on other architectures
diff --git a/src/block/mod.rs b/src/block/mod.rs index d62a06b..0aa56d8 100644 --- a/src/block/mod.rs +++ b/src/block/mod.rs @@ -19,6 +19,7 @@ //! ``` use super::liblz4::*; +use libc::c_char; use std::io::{Error, ErrorKind, Result}; /// Represents the compression mode do be used. @@ -78,8 +79,8 @@ pub fn compre...
1
9
8
3d4cf7ce635261ca7364f75f4b73691926d2f315
Jens Heyens
2018-09-11T14:20:20
Update dependencies
diff --git a/Cargo.toml b/Cargo.toml index f363847..91d6ac8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,12 +15,12 @@ test = false doc = false [dependencies] -libc = "0.2.39" -lz4-sys = { path = "lz4-sys", version = "1.8.0" } +libc = "0.2.43" +lz4-sys = { path = "lz4-sys", version = "1.8.2" } [dev-dependencie...
3
14
10
50734fee730c3a4b408e84d82b712a26add41b84
Jens Heyens
2018-09-11T13:20:52
Update to v1.23.0
diff --git a/Cargo.toml b/Cargo.toml index eed0c41..f363847 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "lz4" license = "MIT" -version = "1.22.0" +version = "1.23.0" readme = "README.md" -authors = [ "Artem V. Navrotskiy <bozaro@buzzsoft.ru>" ] +authors = [ "Jens Heyens <jens.heyens@ew...
1
2
2
3d54bd20050037bbff3128298b30af3eb127ad57
Kornel
2018-08-06T19:23:00
Update cc crate
diff --git a/lz4-sys/Cargo.toml b/lz4-sys/Cargo.toml index 501289a..6357364 100644 --- a/lz4-sys/Cargo.toml +++ b/lz4-sys/Cargo.toml @@ -12,4 +12,4 @@ repository = "https://github.com/bozaro/lz4-rs" libc = "0.2.17" [build-dependencies] -gcc = "0.3.54" +cc = "1.0.18" diff --git a/lz4-sys/build.rs b/lz4-sys/build.rs ...
2
3
3
2a69fbe9b07412975e2ddd2efbb62bcdf5554db0
Jens Heyens
2018-06-05T12:58:47
Use rustfmt defaults for code style
diff --git a/src/bin/lz4.rs b/src/bin/lz4.rs index 5d1ba79..99c41b0 100644 --- a/src/bin/lz4.rs +++ b/src/bin/lz4.rs @@ -1,11 +1,11 @@ extern crate lz4; -use std::iter::FromIterator; use std::env; use std::fs::File; -use std::io::Result; use std::io::Read; +use std::io::Result; use std::io::Write; +use std::iter...
6
166
106
907d044f52d285fd2a4d4d214b4afbc892bd2a95
Jens Heyens
2018-06-05T12:57:08
Switch to c_int type alias for i32 for consistency
diff --git a/lz4-sys/src/lib.rs b/lz4-sys/src/lib.rs index 4c1afc5..de70442 100644 --- a/lz4-sys/src/lib.rs +++ b/lz4-sys/src/lib.rs @@ -94,19 +94,19 @@ extern "C" { // int LZ4_compress_default(const char* source, char* dest, int sourceSize, int maxDestSize); #[allow(non_snake_case)] - pub fn LZ4_compres...
2
14
14
68f079e4d25ac46da1fb2d3f1a81e204e73746cf
Jens Heyens
2018-05-29T15:08:34
Add block mode bindings. Add documentation. Add prefixed compression mode.
diff --git a/src/block/mod.rs b/src/block/mod.rs index fa5606b..30b51ff 100644 --- a/src/block/mod.rs +++ b/src/block/mod.rs @@ -1,16 +1,47 @@ -//! Defines the compression mode used by lz4 compress +//! This module provides access to the block mode functions of the lz4 C library. +//! It somehow resembles the [Python-l...
1
165
33
5c7e7faf7538376bc0bedeb800aff795b6c28eec
Jens Heyens
2018-05-29T00:34:14
WIP lz4 block mode. I'm tired.
diff --git a/lz4-sys/src/lib.rs b/lz4-sys/src/lib.rs index fe8e275..4c1afc5 100644 --- a/lz4-sys/src/lib.rs +++ b/lz4-sys/src/lib.rs @@ -1,7 +1,7 @@ #![no_std] extern crate libc; -use libc::{c_void, c_char, c_uint, size_t}; +use libc::{c_void, c_char, c_uint, size_t, c_int}; #[derive(Clone, Copy)] #[repr(C)] @@...
3
121
1
293a79dc54b1660c5da3907ee847967738f531b8
Chris West (Faux)
2018-03-24T20:30:26
bump deps; rephrase broken test
diff --git a/Cargo.toml b/Cargo.toml index 4aeaf11..eed0c41 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,12 +15,12 @@ test = false doc = false [dependencies] -libc = "0.2.23" +libc = "0.2.39" lz4-sys = { path = "lz4-sys", version = "1.8.0" } [dev-dependencies] -rand = "0.3.15" -skeptic = "0.9.0" +rand = "0.4...
2
5
5
41509fea212e9ca55c1f6c53d4fd1ddf28cdf689
Jay Lee
2017-11-30T07:22:55
update gcc
diff --git a/lz4-sys/Cargo.toml b/lz4-sys/Cargo.toml index 501289a..3356f3e 100644 --- a/lz4-sys/Cargo.toml +++ b/lz4-sys/Cargo.toml @@ -12,4 +12,4 @@ repository = "https://github.com/bozaro/lz4-rs" libc = "0.2.17" [build-dependencies] -gcc = "0.3.54" +cc = "1.0" diff --git a/lz4-sys/build.rs b/lz4-sys/build.rs ind...
2
3
3
7b632aacb0d714320166d09da9898103013ff8b1
Jay Lee
2017-11-21T08:03:47
adjust build
diff --git a/lz4-sys/build.rs b/lz4-sys/build.rs index 8ac8205..0f539ea 100644 --- a/lz4-sys/build.rs +++ b/lz4-sys/build.rs @@ -1,6 +1,7 @@ extern crate gcc; -use std::env; +use std::{env, fs}; +use std::path::PathBuf; fn main() { let mut compiler = gcc::Build::new(); @@ -20,4 +21,16 @@ fn main() { _...
1
14
1
1d62d010ca5ab324a2788fae948b6e512bef4b9f
Artem V. Navrotskiy
2017-11-12T20:39:11
Update gcc to v0.3.54
diff --git a/lz4-sys/Cargo.toml b/lz4-sys/Cargo.toml index 8bc86a6..501289a 100644 --- a/lz4-sys/Cargo.toml +++ b/lz4-sys/Cargo.toml @@ -12,4 +12,4 @@ repository = "https://github.com/bozaro/lz4-rs" libc = "0.2.17" [build-dependencies] -gcc = "0.3.38" +gcc = "0.3.54" diff --git a/lz4-sys/build.rs b/lz4-sys/build.rs...
2
2
2
cbba9988a3f19a3631cd0724fd777bc85cb8869d
Xidorn Quan
2017-11-10T09:18:45
Remove gcc from deps of lz4
diff --git a/Cargo.toml b/Cargo.toml index a6b8e8b..7699f02 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,5 +23,4 @@ rand = "0.3.15" skeptic = "0.9.0" [build-dependencies] -gcc = "0.3.49" skeptic = "0.9.0"
1
0
1
810a036cbb2125b711fbf96ef538bca497b7b68e
Artem V. Navrotskiy
2017-08-24T20:12:53
Add README.md to Cargo.toml
diff --git a/Cargo.toml b/Cargo.toml index a45b895..a6b8e8b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,7 @@ name = "lz4" license = "MIT" version = "1.21.1" +readme = "README.md" authors = [ "Artem V. Navrotskiy <bozaro@buzzsoft.ru>" ] build = "build.rs" description = "Rust LZ4 bindings library."
1
1
0
933a982556aa1e2d319c9694e53d5b10d69e931c
Artem V. Navrotskiy
2017-05-31T19:55:36
Fix smallest 11-byte .lz4 stream decoding
diff --git a/Cargo.toml b/Cargo.toml index 3622942..d60ef04 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "lz4" license = "MIT" -version = "1.20.0" +version = "1.21.0" authors = [ "Artem V. Navrotskiy <bozaro@buzzsoft.ru>" ] build = "build.rs" description = "Rust LZ4 bindings library."...
3
21
5
65bba5b1f7648539f9459058e00ae3e767009980
Artem V. Navrotskiy
2017-03-17T14:28:44
Fix test_version_number compilation (#19)
diff --git a/lz4-sys/src/lib.rs b/lz4-sys/src/lib.rs index 2334447..fe8e275 100644 --- a/lz4-sys/src/lib.rs +++ b/lz4-sys/src/lib.rs @@ -344,5 +344,5 @@ extern "C" { #[test] fn test_version_number() { - unsafe { LZ4_versionNumber() } + unsafe { LZ4_versionNumber(); } }
1
1
1
3d70f69cd4d922038fef7f4ffed806c38e5065a2
Artem V. Navrotskiy
2016-11-26T20:20:30
Mark lz4-sys as nostd
diff --git a/lz4-sys/src/lib.rs b/lz4-sys/src/lib.rs index 9d84276..2334447 100644 --- a/lz4-sys/src/lib.rs +++ b/lz4-sys/src/lib.rs @@ -1,12 +1,6 @@ +#![no_std] extern crate libc; -use std::fmt::Display; -use std::fmt::Formatter; -use std::io::Error; -use std::io::ErrorKind; -use std::str; -use std::ffi::CStr; - u...
3
53
45
543a056cc28069ad68d9af62a941cf7350829483
Artem V. Navrotskiy
2016-09-22T10:17:18
Update dependencies
diff --git a/Cargo.toml b/Cargo.toml index dccd671..77f9c1c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,12 +14,12 @@ test = false doc = false [dependencies] -libc = "0.2.5" +libc = "0.2.16" [dev-dependencies] rand = "0.3.14" skeptic = "0.6.1" [build-dependencies] -gcc = "0.3.21" +gcc = "0.3.35" skeptic...
1
2
2
00b7b1e1ba9cd7b05bf68563df0faa5ccce1d4c1
Maxime Lenoir
2016-08-18T08:24:42
Make Encoder and Decoder Send LZ4F{Compression,Decompression}Context are raw pointers which make Encoder and Decoder non-Send. However, given that those contexts are uniquely owned by the Encoder/Decoder, it is safe to implement Send on them, making Encoder/Decoder Send themselves.
diff --git a/src/decoder.rs b/src/decoder.rs index 7ca62b4..7f5f3a3 100644 --- a/src/decoder.rs +++ b/src/decoder.rs @@ -96,7 +96,7 @@ impl<R: Read> Read for Decoder<R> { impl DecoderContext { fn new() -> Result<DecoderContext> { - let mut context: LZ4FDecompressionContext = ptr::null_mut(); + let...
3
24
4
2630ab9bd2678a346be27986e52df9694c2a0905
Artem V. Navrotskiy
2016-06-12T20:24:47
Add read fails test (test for #14)
diff --git a/Cargo.toml b/Cargo.toml index b51ec3c..85af1fd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,6 +17,7 @@ doc = false libc = "0.2.5" [dev-dependencies] +rand = "0.3.14" skeptic = "0.4" [build-dependencies] diff --git a/src/decoder.rs b/src/decoder.rs index c1cacc0..7ca62b4 100644 --- a/src/decoder....
2
97
9
578be4ae214c16447a5dfcaa2e26fdcb70c6c62a
Brian Vincent
2016-06-12T05:33:02
Don't leave Decoder in invalid state if read fails If a read fails, such as in the case of non-blocking IO, we don't want to leave the Decoder in an invalid state. Only change the state of the Decoder if a read succeeds, otherwise, allow for calling again.
diff --git a/src/decoder.rs b/src/decoder.rs index f187b11..c1cacc0 100644 --- a/src/decoder.rs +++ b/src/decoder.rs @@ -58,7 +58,6 @@ impl<R: Read> Read for Decoder<R> { let mut dst_offset: usize = 0; while dst_offset == 0 { if self.pos >= self.len { - self.pos = 0; ...
1
1
1
77e89fd59da300de8b5309850a1c681f4849dff7
Artem V. Navrotskiy
2016-05-10T20:42:06
Remove unused code
diff --git a/src/bin/lz4.rs b/src/bin/lz4.rs index 07afc2b..5d1ba79 100644 --- a/src/bin/lz4.rs +++ b/src/bin/lz4.rs @@ -50,25 +50,3 @@ fn copy(src: &mut Read, dst: &mut Write) -> Result<()> { } Ok(()) } - -struct Wrapper<W: Write> { - w: W, - written_size: usize, -} - -impl<W: Write> Wrapper<W> { - ...
1
0
22