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
3b7208b221eb7c184f80de64cf383c229e3cd1a4
oyvindln
2019-07-19T14:31:56
Reduce unsafe usage in encoder The only unsafe code now is the unaligned_reads that are immidiately preceeded by bounds checks. This commit seems to slow down fast mode slightly, while non-fast mode seems to be faster than the latest published version. Also fixes compile issue on 32-bit.
diff --git a/miniz_oxide/src/deflate/buffer.rs b/miniz_oxide/src/deflate/buffer.rs index 05ba26d..57f41b5 100644 --- a/miniz_oxide/src/deflate/buffer.rs +++ b/miniz_oxide/src/deflate/buffer.rs @@ -8,9 +8,10 @@ use crate::deflate::core::{LZ_DICT_SIZE, MAX_MATCH_LEN}; pub const LZ_CODE_BUF_SIZE: usize = 64 * 1024; /// ...
3
49
72
335261cbfabdd365713f22faefcd4b8007518a45
oyvindln
2019-07-13T12:22:24
Remove some more unsafe code - couldn't see any performance difference fix warning
diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs index 4c75b9e..83ed972 100644 --- a/miniz_oxide/src/deflate/core.rs +++ b/miniz_oxide/src/deflate/core.rs @@ -296,26 +296,10 @@ unsafe fn write_u16_le_uc(val: u16, slice: &mut [u8], pos: usize) { *slice.as_mut_ptr().add(pos + 1) = (val ...
1
26
52
f5d65458635162c05999343ba05d730312c4515f
oyvindln
2019-07-10T18:42:59
cargo fix --edition and fix more clippy warnings
diff --git a/miniz_oxide/src/deflate/buffer.rs b/miniz_oxide/src/deflate/buffer.rs index 9eb50aa..05ba26d 100644 --- a/miniz_oxide/src/deflate/buffer.rs +++ b/miniz_oxide/src/deflate/buffer.rs @@ -2,7 +2,7 @@ //! to avoid stack copies. Box::new() doesn't at the moment, and using a vec means we would lose //! static l...
5
45
49
88b4ae37c24202d405860228f704fc889f1966fc
oyvindln
2019-07-06T15:41:54
Fix a bunch of clippy warnings
diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs index 794b91f..b26e945 100644 --- a/miniz_oxide/src/deflate/core.rs +++ b/miniz_oxide/src/deflate/core.rs @@ -575,7 +575,7 @@ impl BitBuffer { inner.copy_from_slice(&u64_to_le_bytes(self.bit_buffer)); } output....
2
78
66
92c78ba46e94777526201ba59592ba608865ebdf
oyvindln
2019-07-06T13:09:33
Remove unused function and fix warning
diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.rs index 36c2b07..482216f 100644 --- a/miniz_oxide/src/inflate/core.rs +++ b/miniz_oxide/src/inflate/core.rs @@ -407,17 +407,6 @@ fn fill_bit_buffer(l: &mut LocalVars, in_iter: &mut slice::Iter<u8>) { } } -#[inline] -fn _transfer_unalig...
2
3
13
b8e17c50a5068931257e1daac61c892e44693091
oyvindln
2019-07-01T14:03:17
Fix missing version bump
diff --git a/Cargo.toml b/Cargo.toml index 3355556..5b5b6d2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ name = "miniz_oxide_c_api" [dependencies] libc = "0.2.22" crc32fast = "1.2.0" -miniz_oxide = { path = "miniz_oxide", version = "0.2.1" } +miniz_oxide = { path = "miniz_oxide", version = "0.2.2" } ...
1
1
1
860fc188f4c14754cf6a82cec4878d40668eb598
oyvindln
2019-07-01T14:00:06
bump version for publish (#51) * Use standard rust allocator in C API, save state type in mz_stream * fix tests on 32-bit platforms * Avoid more usafe use and deprecate unsafe function. * Bump version, fix some warnings
diff --git a/Cargo.toml b/Cargo.toml index a23d360..3355556 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "miniz_oxide_c_api" authors = ["Frommi <daniil.liferenko@gmail.com>"] -version = "0.2.1" +version = "0.2.2" build = "src/build.rs" license = "MIT" readme = "README.md" diff --git a...
6
33
30
918f89fcb16f5552648d5c119a8307eb6bda9488
oyvindln
2019-06-30T18:24:34
Use standard rust allocator in C API, save state type in mz_stream (#49) * Use standard rust allocator in C API, save state type in mz_stream * fix tests on 32-bit platforms * Avoid more usafe use and deprecate unsafe function.
diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.rs index 93ba366..0fe0634 100644 --- a/miniz_oxide/src/inflate/core.rs +++ b/miniz_oxide/src/inflate/core.rs @@ -205,7 +205,10 @@ impl DecompressorOxide { /// Create a new decompressor with only the state field initialized. /// /...
5
186
24
7fc6d66be47665174de4960cc23361bdb1d42134
Sergey "Shnatsel" Davidoff
2019-06-23T11:19:37
Fix buffer overflow bug in deflate::core::BitBuffer::flush (#47) * Fix buffer overflow bug in deflate::core::BitBuffer::flush The problem is that this function does not check that there is enough space to fit a u64, it only checks that the starting position for the write is in bounds. I have tried adding `assert!(...
diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs index 62c4382..b091428 100644 --- a/miniz_oxide/src/deflate/core.rs +++ b/miniz_oxide/src/deflate/core.rs @@ -570,11 +570,9 @@ impl BitBuffer { fn flush(&mut self, output: &mut OutputBufferOxide) -> io::Result<()> { let pos =...
1
10
5
759476f52e27b9c2c9f15dc4ddc1d5bfa5238a9c
Sergey "Shnatsel" Davidoff
2019-06-22T16:01:06
Expand comment on `unsafe` in `read_u16_le()` (#46) I've spent an hour figuring out if this function is sound or not, might as well document it so that future readers don't have to
diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs index c7da7aa..62c4382 100644 --- a/miniz_oxide/src/deflate/core.rs +++ b/miniz_oxide/src/deflate/core.rs @@ -313,6 +313,8 @@ fn read_u16_le(slice: &[u8], pos: usize) -> u16{ // # Unsafe // We just checked that there is space. ...
1
2
0
e9fc7890ee8696606ed3f5dc99e06e63e6ce7189
Sergey "Shnatsel" Davidoff
2019-06-22T15:47:54
Fix test-only function write_u16_le() (#45)
diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs index 217c6a7..c7da7aa 100644 --- a/miniz_oxide/src/deflate/core.rs +++ b/miniz_oxide/src/deflate/core.rs @@ -278,8 +278,9 @@ fn write_u16_le(val: u16, slice: &mut [u8], pos: usize) { assert!(pos < slice.len()); // # Unsafe //...
1
2
1
b43b2c32b3b94679ba8a50c4aa8f57c552a33d05
Sam Rijs
2019-03-05T12:41:00
use crc32fast crate for SIMD accelerated CRC32
diff --git a/Cargo.toml b/Cargo.toml index beb6303..a23d360 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ name = "miniz_oxide_c_api" [dependencies] libc = "0.2.22" -crc = "1.0.0" +crc32fast = "1.2.0" miniz_oxide = { path = "miniz_oxide", version = "0.2.1" } [build-dependencies] diff --git a/src/lib...
2
5
6
01ec69bb19ad3bcfd591846b4253719fa0a4511b
Frommi
2019-01-23T15:55:05
Bump to version 0.2.1
diff --git a/Cargo.toml b/Cargo.toml index 4fa0b03..beb6303 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "miniz_oxide_c_api" authors = ["Frommi <daniil.liferenko@gmail.com>"] -version = "0.2.0" +version = "0.2.1" build = "src/build.rs" license = "MIT" readme = "README.md" @@ -23,7 +23...
2
3
3
cd46d0b671ec0c0585d026c9837736e9b59ff158
Igor Gnatenko
2018-11-09T19:31:32
exclude irrelevant files from crates.io (#41)
diff --git a/Cargo.toml b/Cargo.toml index 2a7e7a8..4fa0b03 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ repository = "https://github.com/Frommi/miniz_oxide" homepage = "https://github.com/Frommi/miniz_oxide/" documentation = "https://docs.rs/miniz_oxide_c_api" description = "DEFLATE compression and de...
1
1
1
0b73c12e1f0c62886f7c5775d065a19c30b811d1
Vlad Beskrovnyy
2018-11-09T19:31:19
Remove "allocator_api" unstable feature usage (#40)
diff --git a/src/lib.rs b/src/lib.rs index 7af5d06..de1c2fa 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,3 @@ -#![cfg_attr(any(feature = "libc_stub", all(target_arch = "wasm32", not(target_os = "emscripten"))), feature(allocator_api))] - extern crate crc; #[cfg(not(any(feature = "libc_stub", all(target_arch = ...
1
4
12
e6c214efd253491ac072c2c9adba87ef5b4cd5cb
Frommi
2018-10-16T20:29:32
Bump version to 0.2.0
diff --git a/Cargo.toml b/Cargo.toml index 0143155..2a7e7a8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "miniz_oxide_c_api" authors = ["Frommi <daniil.liferenko@gmail.com>"] -version = "0.1.3" +version = "0.2.0" build = "src/build.rs" license = "MIT" readme = "README.md" @@ -23,7 +23...
2
3
3
f398d88259e957c5360f3689b55007d9de50ec6b
Daniel Holbert
2018-09-14T19:41:45
Fix typo (missing "h" in "synchronization") (#39) Just fixing a typo in a code comment. The comment previously said "syncronization" which was missing an 'h'.
diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.rs index 2218a3f..93ba366 100644 --- a/miniz_oxide/src/inflate/core.rs +++ b/miniz_oxide/src/inflate/core.rs @@ -1182,7 +1182,7 @@ fn decompress_inner( if !valid { Action::Jump(BadRawLength) ...
1
1
1
36a520e24d562160079d54926d69d755bd974e4f
Sébastien Lerique
2018-07-19T08:09:35
Add a Cargo `libc_stub` feature to opt into libc stubbing
diff --git a/Cargo.toml b/Cargo.toml index 08173ec..0143155 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,6 +36,7 @@ benching = ["build_orig_miniz", "no_c_export"] build_orig_miniz = [] build_stub_miniz = [] no_c_export = [] +libc_stub = [] [profile.dev] panic = "abort" diff --git a/src/lib.rs b/src/lib.rs ind...
2
3
2
21ddbda929d6b61b8e6c1d4fbc7c846187c107db
Sébastien Lerique
2018-07-17T18:30:06
Stub libc calls for wasm32
diff --git a/src/lib.rs b/src/lib.rs index 6a71bcf..fad2c9e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,58 @@ +#![feature(allocator_api)] + extern crate crc; +#[cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))] extern crate libc; +#[cfg(all(target_arch = "wasm32", not(target_os = "emscript...
1
53
0
9fe8b158bd7ece9237c30fb3a46c88ad04b928b8
Frommi
2018-07-16T17:16:44
compress_to_output now uses closures; removed libc dependency from mimiz_oxide
diff --git a/miniz_oxide/Cargo.toml b/miniz_oxide/Cargo.toml index 228fc07..05dad30 100644 --- a/miniz_oxide/Cargo.toml +++ b/miniz_oxide/Cargo.toml @@ -15,5 +15,4 @@ description = "DEFLATE compression and decompression library rewritten in Rust b name = "miniz_oxide" [dependencies] -libc = "0.2.22" adler32 = "1.0...
4
58
44
573e60f8c97527cd5eefef05083014b8b9dc3c54
Sergey "Shnatsel" Davidoff
2018-07-15T01:13:44
Initial quick'n'dirty disabling of adler32 check on input during decompression when built with fuzzing instrumentation
diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.rs index 18b7327..2218a3f 100644 --- a/miniz_oxide/src/inflate/core.rs +++ b/miniz_oxide/src/inflate/core.rs @@ -1655,11 +1655,15 @@ fn decompress_inner( &out_buf.get_ref()[out_buf_start_pos..out_buf_pos], ); - //...
1
9
5
81fa450e1aa3ba93d67835c3e44f426b5336e1e1
oyvindln
2018-07-13T14:25:52
Avoid using C types on wasm32-unknown-unknown target Temporary fix until we change the callback API
diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs index 86e2a12..44d0f96 100644 --- a/miniz_oxide/src/deflate/core.rs +++ b/miniz_oxide/src/deflate/core.rs @@ -9,6 +9,21 @@ use super::super::*; use shared::{HUFFMAN_LENGTH_ORDER, MZ_ADLER32_INIT, update_adler32}; use deflate::buffer::{Hash...
2
24
7
a40d7511edc3776fd0fc7fb49611df009db1fa67
Camille TJHOA
2018-07-13T12:21:40
Remove libc from shared.rs (#27) * Remove libc from shared.rs * Change MZ_ADLER32_INIT from u64 to u32 * fixup! Change MZ_ADLER32_INIT from u64 to u32
diff --git a/miniz_oxide/src/shared.rs b/miniz_oxide/src/shared.rs index 218f277..9f59c67 100644 --- a/miniz_oxide/src/shared.rs +++ b/miniz_oxide/src/shared.rs @@ -1,12 +1,11 @@ use adler32::RollingAdler32; -use libc::{c_uint, c_ulong}; -pub const MZ_ADLER32_INIT: c_ulong = 1; +pub const MZ_ADLER32_INIT : u32 = 1; ...
2
5
6
ed6289be80f56b4c2f7c0c15793200afe39de1be
oyvindln
2018-07-13T12:17:26
Add some coverage tests from zlib-ng Will add more
diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.rs index 577cefb..18b7327 100644 --- a/miniz_oxide/src/inflate/core.rs +++ b/miniz_oxide/src/inflate/core.rs @@ -1780,7 +1780,7 @@ mod test { assert_eq!(masked_lookup(dt, 20), (5, 5)); } - fn check_result(input: &[u8], status...
1
51
11
1c3cabbe30acc25f571db5fd3b425f16694fe680
Yu Ding
2018-06-25T21:51:26
Improve buffer operation in miniz_oxide inflate/deflate mod.rs. Rust has a llvm backend and it automatically optimizes on such buffer operations. The performance benchmark results show that performance gained ~1%-~1.5% in this patch.
diff --git a/miniz_oxide/src/deflate/mod.rs b/miniz_oxide/src/deflate/mod.rs index b60c377..b71bb46 100644 --- a/miniz_oxide/src/deflate/mod.rs +++ b/miniz_oxide/src/deflate/mod.rs @@ -119,13 +119,8 @@ fn compress_to_vec_inner(input: &[u8], level: u8, window_bits: i32, strategy: i3 // The comp flags function sets ...
2
5
31
10c070c61b2d412358196db1e83f48f3b7422d7e
Frommi
2018-06-23T13:46:16
Bump version to 0.1.3
diff --git a/Cargo.toml b/Cargo.toml index 6d32553..08173ec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "miniz_oxide_c_api" authors = ["Frommi <daniil.liferenko@gmail.com>"] -version = "0.1.2" +version = "0.1.3" build = "src/build.rs" license = "MIT" readme = "README.md" @@ -23,7 +23...
2
3
3
43fce45711da49324bcc42a4ffbf0449c50e103f
Frommi
2018-05-20T21:47:52
return HasMoreOutput instead of BadParam on 0-len out buffers
diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.rs index ba03f30..577cefb 100644 --- a/miniz_oxide/src/inflate/core.rs +++ b/miniz_oxide/src/inflate/core.rs @@ -1016,7 +1016,7 @@ fn decompress_fast( /// stores previously decompressed data if any. /// * The position of the output cursor ind...
1
31
10
8d8bccfb36782307fa3cab1952bf6ec16aee23af
Frommi
2018-05-20T20:24:49
use min size starting buffer instead of 0-len in decompress_mem_to_heap
diff --git a/src/tinfl.rs b/src/tinfl.rs index 8146a97..db0e1dc 100644 --- a/src/tinfl.rs +++ b/src/tinfl.rs @@ -79,9 +79,9 @@ pub unsafe extern "C" fn tinfl_decompress_mem_to_heap( let mut decomp = tinfl_decompressor::with_init_state_only(); // Pointer to the buffer to place the decompressed data into. - ...
1
2
2
edf5e08d0f4825e52d02edcc0219aed8a018c691
oyvindln
2018-05-20T08:49:23
Avoid panicking when decompress is passed an empty output buffer + document a bit Fixes #23
diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.rs index a648206..ba03f30 100644 --- a/miniz_oxide/src/inflate/core.rs +++ b/miniz_oxide/src/inflate/core.rs @@ -1007,13 +1007,33 @@ fn decompress_fast( /// out_cur is full, the end of the deflate stream is hit, or there is an error in the def...
1
38
2
7602ebe24c80616423bb982fc8b80879541726ef
Frommi
2018-02-23T21:30:03
repair assert
diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.rs index cdaba31..a648206 100644 --- a/miniz_oxide/src/inflate/core.rs +++ b/miniz_oxide/src/inflate/core.rs @@ -769,7 +769,7 @@ fn transfer( match_len: usize, out_buf_size_mask: usize, ) { - debug_assert!(out_pos + match_len < ou...
1
2
2
33d5c68f134695f313f1085c7562fd7386b05ed7
Frommi
2018-02-23T19:24:23
fn apply_match to reduce code duplication; match len 3 fast path
diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.rs index 56dc75e..cdaba31 100644 --- a/miniz_oxide/src/inflate/core.rs +++ b/miniz_oxide/src/inflate/core.rs @@ -761,6 +761,84 @@ struct LocalVars { pub dist_from_out_buf_start: usize, } +#[inline] +fn transfer( + out_slice: &mut [u8...
1
129
148
43ae51491f06555c726b5aeb8a1b228cdecb8f63
Frommi
2018-02-22T18:59:16
repair table lookup checking after merge
diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.rs index 5323875..56dc75e 100644 --- a/miniz_oxide/src/inflate/core.rs +++ b/miniz_oxide/src/inflate/core.rs @@ -800,40 +800,39 @@ fn decompress_fast( fill_bit_buffer(&mut l, &mut in_iter); if let Some((symbol, code_...
1
41
37
25d962a66ba5089ceaf8ae48a9404299a50e2465
Frommi
2018-02-22T18:42:59
decompress_fast now doesnt worry about end of input, checking once at start; style
diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.rs index d97b3d5..725ba6f 100644 --- a/miniz_oxide/src/inflate/core.rs +++ b/miniz_oxide/src/inflate/core.rs @@ -13,24 +13,24 @@ pub const TINFL_LZ_DICT_SIZE: usize = 32_768; #[repr(C)] struct HuffmanTable { /// Length of the code at eac...
3
151
219
33585a6eced18a19dcd316d4684c350ba2b22347
oyvindln
2018-02-04T21:29:42
Avoid dropping non-initialized values leading to reading uninitialized bytes Still doesn't seem to fix all segfaults though.
diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs index d891b00..af8b5ad 100644 --- a/miniz_oxide/src/deflate/core.rs +++ b/miniz_oxide/src/deflate/core.rs @@ -332,7 +332,7 @@ fn read_u16_le(slice: &[u8], pos: usize) -> u16{ pub struct CompressorOxide { lz: LZOxide, params: Param...
3
99
31
f907ff7a536d652e00208fc869839c9ea166fc01
oyvindln
2018-01-28T23:31:03
Box some stuff using the Box::default() trick to reduce stack usage
diff --git a/miniz_oxide/src/deflate/buffer.rs b/miniz_oxide/src/deflate/buffer.rs new file mode 100644 index 0000000..9eb50aa --- /dev/null +++ b/miniz_oxide/src/deflate/buffer.rs @@ -0,0 +1,38 @@ +//! Buffer wrappers implementing default so we can allocate the buffers with `Box::default()` +//! to avoid stack copies....
3
79
46
01a57125fc0c6ba87629adfa7b3046030f2f347b
oyvindln
2018-01-28T14:49:47
remove -x flag on source code
diff --git a/fuzz/fuzz_targets/fuzz_high.rs b/fuzz/fuzz_targets/fuzz_high.rs old mode 100755 new mode 100644 diff --git a/fuzz/fuzz_targets/inflate_nonwrapping.rs b/fuzz/fuzz_targets/inflate_nonwrapping.rs old mode 100755 new mode 100644
2
0
0
b7da730f7e7bd6e747c60476f8cb32960d246ce9
oyvindln
2018-01-26T20:18:04
Don't specify crate type as it causes problems in some cases + remove unneeded ()
diff --git a/Cargo.toml b/Cargo.toml index e2f32d4..a88613e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,6 @@ exclude = ["benches/data/*"] [lib] name = "miniz_oxide_c_api" -crate-type = ['rlib'] [dependencies] libc = "0.2.22" diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.r...
3
4
5
901424d45067033af1f56701f98ea9bce6d155e7
oyvindln
2018-01-21T21:42:25
Fix overflow on invalid length or distance code Fixes #19 and maybe #13 as well
diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.rs index 86b718b..d97b3d5 100644 --- a/miniz_oxide/src/inflate/core.rs +++ b/miniz_oxide/src/inflate/core.rs @@ -251,6 +251,8 @@ enum State { DistanceOutOfBounds, BadRawLength, BadCodeSizeDistPrevLookup, + InvalidLitlen, + ...
1
33
12
dc0c8a6a449929613307bb7993e5d1118a4e534e
Igor Gnatenko
2018-01-12T23:12:27
chmod -x *.rs Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
diff --git a/benches/bench.rs b/benches/bench.rs old mode 100755 new mode 100644 diff --git a/miniz_oxide/src/inflate/mod.rs b/miniz_oxide/src/inflate/mod.rs old mode 100755 new mode 100644 diff --git a/src/tinfl.rs b/src/tinfl.rs old mode 100755 new mode 100644
3
0
0
e37cc4a5a232e29e5acf5ccefdae5d2caefd0f0e
Frommi
2018-01-09T21:17:43
miniz_oxide crate bump version
diff --git a/Cargo.toml b/Cargo.toml index 7ef7f5d..e2f32d4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ crate-type = ['rlib'] [dependencies] libc = "0.2.22" crc = "1.0.0" -miniz_oxide = { path = "miniz_oxide", version = "0.1.1" } +miniz_oxide = { path = "miniz_oxide", version = "0.1.2" } [build-dep...
2
2
2
0bd885189288cf67e98a337196e658ce2d1e845d
oyvindln
2018-01-09T20:50:18
Fix panic on running out of space in wrapping buffer Fixes https://github.com/alexcrichton/flate2-rs/issues/142, and possibly #13 as well.
diff --git a/Cargo.toml b/Cargo.toml index a3752ec..7ef7f5d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "miniz_oxide_c_api" authors = ["Frommi <daniil.liferenko@gmail.com>"] -version = "0.1.1" +version = "0.1.2" build = "src/build.rs" license = "MIT" readme = "README.md" diff --git a...
2
24
4
dac44f950253d3b9c92f9c21e196dbe538dd7c42
Frommi
2017-10-28T21:55:38
bumb version in dependency
diff --git a/Cargo.toml b/Cargo.toml index 8bacd95..a3752ec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ crate-type = ['rlib'] [dependencies] libc = "0.2.22" crc = "1.0.0" -miniz_oxide = { path = "miniz_oxide", version = "0.1.0" } +miniz_oxide = { path = "miniz_oxide", version = "0.1.1" } [build-dep...
1
1
1
6dad4e9382fca0047fb81b3e35e2158f24de220e
Frommi
2017-10-28T21:51:11
bump version
diff --git a/Cargo.toml b/Cargo.toml index cd1c2bb..8bacd95 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "miniz_oxide_c_api" authors = ["Frommi <daniil.liferenko@gmail.com>"] -version = "0.1.0" +version = "0.1.1" build = "src/build.rs" license = "MIT" readme = "README.md" diff --git a...
2
2
2
a9241e392d22e14e0ec4988db1407522ee21034b
oyvindln
2017-10-22T13:48:33
Improve block type selection on short input + minor cleanups Change the heuristic selecting block type so we only output a stored block if the input is longer than 32. The old heuristic would select stored blocks for some short inputs where a static block would be much better. Added a test to check for this. Remove u...
diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs index fc862b2..29b6ccd 100644 --- a/miniz_oxide/src/deflate/core.rs +++ b/miniz_oxide/src/deflate/core.rs @@ -916,6 +916,7 @@ impl HuffmanOxide { } fn start_dynamic_block(&mut self, output: &mut OutputBufferOxide) -> io::Result<(...
3
44
10
61ff8a5adcbf57d11809268f5f8b76bfb2f09fae
oyvindln
2017-10-18T19:13:07
Fix benches on MSVC, fix warning Had to specify static in the link attribute, otherwise MSVC thought we were linking to a dll
diff --git a/benches/bench.rs b/benches/bench.rs index 410e4d3..765c930 100755 --- a/benches/bench.rs +++ b/benches/bench.rs @@ -9,7 +9,7 @@ extern crate test; use test::Bencher; use std::io::Read; use std::{ops, ptr}; -use libc::{c_int, c_void}; +use libc::c_void; use miniz_oxide::deflate::compress_to_vec; use ...
2
4
4
517016dbf2ba8af560d000a3bfa9176f371ae729
oyvindln
2017-10-13T19:43:17
Get rid of TDEFL/MZ prefixes on internal constants These aren't really needed in Rust
diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs index c289a4c..fc862b2 100644 --- a/miniz_oxide/src/deflate/core.rs +++ b/miniz_oxide/src/deflate/core.rs @@ -8,13 +8,13 @@ use super::deflate_flags::*; use super::super::*; use shared::{HUFFMAN_LENGTH_ORDER, MZ_ADLER32_INIT, update_adler3...
2
169
170
152c7fb7c9ee7f7feee9335d0b19f50839fced47
oyvindln
2017-10-13T19:27:30
Simplify the matching_code in compress_fast Pad the array by 1-byte instead of altering the loop to not exceed the buffer.
diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs index d87bd95..c289a4c 100644 --- a/miniz_oxide/src/deflate/core.rs +++ b/miniz_oxide/src/deflate/core.rs @@ -1037,8 +1037,12 @@ impl HuffmanOxide { } struct DictOxide { + /// The maximum number of checks in the hash chain, for the in...
1
28
28
74b1f6725a42baa963e821d3d3e7dde394f256c9
Frommi
2017-10-10T21:03:41
exclude bench data from package
diff --git a/Cargo.toml b/Cargo.toml index d2f1504..3b7acc1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,7 @@ repository = "https://github.com/Frommi/miniz_oxide" homepage = "https://github.com/Frommi/miniz_oxide/" documentation = "https://docs.rs/miniz_oxide_c_api" description = "DEFLATE compression and de...
1
1
0
a9755c91a5b4163e1248ea9af21b4015d000d29e
Frommi
2017-10-10T20:29:45
specify miniz_oxide version
diff --git a/Cargo.toml b/Cargo.toml index a095590..d2f1504 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ crate-type = ['rlib'] [dependencies] libc = "0.2.22" crc = "1.0.0" -miniz_oxide = { path = "miniz_oxide" } +miniz_oxide = { path = "miniz_oxide", version = "0.1.0" } [build-dependencies] cc = "1...
1
1
1
0ce3a4fc1a4d06183aaf2baec85f0d93b64f852a
Frommi
2017-10-10T20:27:42
publish prep for miniz_oxide_c_api
diff --git a/Cargo.toml b/Cargo.toml index efe25ce..a095590 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,9 +1,16 @@ [package] name = "miniz_oxide_c_api" +authors = ["Frommi <daniil.liferenko@gmail.com>"] version = "0.1.0" build = "src/build.rs" license = "MIT" -authors = ["Frommi <daniil.liferenko@gmail.com>"] +...
1
12
2
e78e7b8e6f4120fa41d6f35c18ec9fcca74623d7
Frommi
2017-10-10T19:52:04
remove staticlib from crate-type bt default
diff --git a/Cargo.toml b/Cargo.toml index 5c93361..efe25ce 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ authors = ["Frommi <daniil.liferenko@gmail.com>"] [lib] name = "miniz_oxide_c_api" -crate-type = ['staticlib', 'rlib'] +crate-type = ['rlib'] [dependencies] libc = "0.2.22"
1
1
1
f05bf3f6ab2a9f1b0669590766f3418c74c4254b
oyvindln
2017-10-10T19:02:10
Add back some constants that went missing
diff --git a/src/lib.rs b/src/lib.rs index cd40e51..198e115 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -16,7 +16,7 @@ pub use miniz_oxide::mz_adler32_oxide; use miniz_oxide::deflate::CompressionLevel; use miniz_oxide::deflate::core::CompressionStrategy; -mod lib_oxide; +pub mod lib_oxide; use lib_oxide::*; mod...
3
46
2
ecaa930432826ecb800190d810a572c30554ac1f
Frommi
2017-10-10T15:42:28
decompress now updates out_cur
diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.rs index 8aed604..27a97b4 100644 --- a/miniz_oxide/src/inflate/core.rs +++ b/miniz_oxide/src/inflate/core.rs @@ -968,8 +968,8 @@ fn decompress_fast( /// /// # Returns /// returns a tuple containing the status of the compressor, the number of...
1
15
2
c35071a8cbd7c1550bbd73f12226e3efe4a0cf1a
Frommi
2017-10-10T15:33:27
compress return values
diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs index e90134c..d87bd95 100644 --- a/miniz_oxide/src/deflate/core.rs +++ b/miniz_oxide/src/deflate/core.rs @@ -2001,8 +2001,7 @@ fn flush_output_buffer( /// /// # Returns /// Returns a tuple containing the current status of the compressor,...
2
12
7
82bb07422ab278a424ddaa9291cd3d07e3d8ecb6
Frommi
2017-10-10T15:19:12
a bit of docs
diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs index f6cf3ca..e90134c 100644 --- a/miniz_oxide/src/deflate/core.rs +++ b/miniz_oxide/src/deflate/core.rs @@ -1,3 +1,5 @@ +//! Streaming compression functionality. + use std::{cmp, mem, ptr}; use std::io::{self, Cursor, Seek, SeekFrom, Wri...
9
62
61
9e363e6959862ed884efce772cc428f7b6f378dd
Frommi
2017-10-10T13:59:04
move C alloc stuff to miniz_oxide_c_api
diff --git a/miniz_oxide/src/lib.rs b/miniz_oxide/src/lib.rs index c763d67..c33a30d 100644 --- a/miniz_oxide/src/lib.rs +++ b/miniz_oxide/src/lib.rs @@ -31,18 +31,7 @@ mod shared; pub use shared::update_adler32 as mz_adler32_oxide; pub use shared::MZ_ADLER32_INIT; -use libc::{c_int, c_void, size_t}; - - -/// Unused...
3
11
13
ae1899d56b9741d1746d8ff8331f2ea1c156182d
Frommi
2017-10-10T13:00:13
fix alloc
diff --git a/src/tdef.rs b/src/tdef.rs index 0a78740..4c8a4e3 100644 --- a/src/tdef.rs +++ b/src/tdef.rs @@ -155,7 +155,7 @@ pub unsafe extern "C" fn tdefl_compress_mem_to_output( let compressor = ::miniz_def_alloc_func( ptr::null_mut(), 1, - mem::size_of::<CompressorOxide>...
1
2
3
7b0d937a392c55e3ab742696ba1318ae30736086
Frommi
2017-10-10T12:45:22
make deflate callback sane: compress for buffers and compress_to_output for callback; transfer most things to deflate::core::
diff --git a/miniz_oxide/src/deflate/tdef_oxide.rs b/miniz_oxide/src/deflate/core.rs similarity index 96% rename from miniz_oxide/src/deflate/tdef_oxide.rs rename to miniz_oxide/src/deflate/core.rs index d1f03c2..f6cf3ca 100644 --- a/miniz_oxide/src/deflate/tdef_oxide.rs +++ b/miniz_oxide/src/deflate/core.rs @@ -1,11 +...
5
194
181
4b40df94a4fb11fc93ac56ac669d09c1ad7f86d3
Frommi
2017-10-08T22:26:31
fix build x2; migrate TINFLStatus from inflate::core:: to inflate::, decompress_to_vec uses it
diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.rs index 7694bcf..fe576bf 100644 --- a/miniz_oxide/src/inflate/core.rs +++ b/miniz_oxide/src/inflate/core.rs @@ -102,51 +102,6 @@ pub mod inflate_flags { use self::inflate_flags::*; -const TINFL_STATUS_FAILED_CANNOT_MAKE_PROGRESS: i32 = -4...
4
53
47
ce5f2c7e0534cd01d52d9682b0045ab7b1c2e2c5
Frommi
2017-10-08T22:05:26
fix build
diff --git a/src/lib_oxide.rs b/src/lib_oxide.rs index a8b85ff..dd4ab71 100644 --- a/src/lib_oxide.rs +++ b/src/lib_oxide.rs @@ -460,7 +460,7 @@ fn push_dict_out(state: &mut inflate_state, next_out: &mut &mut [u8]) -> c_ulong *next_out = &mut mem::replace(next_out, &mut [])[n..]; state.m_dict_avail -= n as c_...
2
12
12
33f7c92cff4c15c7fa5659dd50a04d5913cc0df6
Frommi
2017-10-08T21:58:06
migrate decompress to inflate::core::
diff --git a/miniz_oxide/src/deflate/mod.rs b/miniz_oxide/src/deflate/mod.rs index 4c40ec0..4aad0fa 100644 --- a/miniz_oxide/src/deflate/mod.rs +++ b/miniz_oxide/src/deflate/mod.rs @@ -29,9 +29,6 @@ pub mod deflate_flags { pub const TDEFL_FORCE_ALL_RAW_BLOCKS: u32 = 0x0008_0000; } -pub use self::deflate_flags::...
5
255
259
f3fd82ab1c23e9cbf6808b5f135ce013cc02a7de
Frommi
2017-10-08T20:44:11
revert DecompressError back to TINFLStatus subset
diff --git a/miniz_oxide/src/inflate/mod.rs b/miniz_oxide/src/inflate/mod.rs index d05262d..75c8fe1 100755 --- a/miniz_oxide/src/inflate/mod.rs +++ b/miniz_oxide/src/inflate/mod.rs @@ -259,22 +259,11 @@ impl tinfl_decompressor { } } -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum DecompressError {...
2
5
20
d47465569d2b24811a3c5c6db5dac6285df4843c
Frommi
2017-10-08T17:12:42
remove a bunch of excessive pubs
diff --git a/miniz_oxide/src/deflate/tdef_oxide.rs b/miniz_oxide/src/deflate/tdef_oxide.rs index f4bcce8..ae55d10 100644 --- a/miniz_oxide/src/deflate/tdef_oxide.rs +++ b/miniz_oxide/src/deflate/tdef_oxide.rs @@ -8,8 +8,7 @@ use super::super::lib_oxide::*; use deflate::PutBufFuncPtrNotNull; use shared::{HUFFMAN_LENGT...
4
31
32
893a7e83f9ace4f670f0f24b523952130a183880
oyvindln
2017-10-03T21:05:39
Fix compression on big-endian + fix doctest in lib.rs Fixes #11 Can probably made a bit cleaner, and we may not want to use unaligned reads at all on ppc/mips
diff --git a/miniz_oxide/src/deflate/mod.rs b/miniz_oxide/src/deflate/mod.rs index 7298a1a..4c40ec0 100644 --- a/miniz_oxide/src/deflate/mod.rs +++ b/miniz_oxide/src/deflate/mod.rs @@ -149,19 +149,19 @@ fn tdefl_compress_mem_to_mem( /// Compress the input data to a vector, using the specified compression level (0-10...
4
168
34
0029aad653dfb0413266572a62d059f5774f9e26
oyvindln
2017-10-02T14:24:04
Fix raw_block test on big endian (turns out only the test was wrong.)
diff --git a/miniz_oxide/src/inflate/tinfl_oxide.rs b/miniz_oxide/src/inflate/tinfl_oxide.rs index 7c5354b..afb4abd 100644 --- a/miniz_oxide/src/inflate/tinfl_oxide.rs +++ b/miniz_oxide/src/inflate/tinfl_oxide.rs @@ -898,9 +898,11 @@ pub fn decompress_oxide( // Check if the length value of a raw bl...
1
5
3
c0bd77d5ff25c65991a70f6b7e538d508d7cb6cd
Frommi
2017-10-02T14:04:01
return + 3 optimization, but safely
diff --git a/miniz_oxide/src/deflate/tdef_oxide.rs b/miniz_oxide/src/deflate/tdef_oxide.rs index 4be397c..f4bcce8 100644 --- a/miniz_oxide/src/deflate/tdef_oxide.rs +++ b/miniz_oxide/src/deflate/tdef_oxide.rs @@ -1776,26 +1776,35 @@ fn compress_fast(d: &mut CompressorOxide, callback: &mut CallbackOxide) -> bool ...
1
27
18
0a1c2dae04582c34d610dae8f892f111d8ec6b5f
oyvindln
2017-10-01T20:53:04
Document unsafe and ensure some safety Changed compress_fast back to using cur_pos + 2 again, since + 3 might potentially read past the array bound (even though it wouldn't cause any harm)
diff --git a/miniz_oxide/src/deflate/mod.rs b/miniz_oxide/src/deflate/mod.rs index f52b4ab..7298a1a 100644 --- a/miniz_oxide/src/deflate/mod.rs +++ b/miniz_oxide/src/deflate/mod.rs @@ -20,7 +20,7 @@ pub mod deflate_flags { pub const TDEFL_NONDETERMINISTIC_PARSING_FLAG: u32 = 0x0000_8000; /// Only look for mat...
2
121
30
88aa6fc01de6a9c5e6ec20d3ec8297c08cdd0241
oyvindln
2017-10-01T19:03:26
gcc -> cc 1.0
diff --git a/Cargo.toml b/Cargo.toml index 2720aea..e11bdda 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,12 +13,11 @@ crate-type = ['staticlib', 'rlib'] [dependencies] libc = "0.2.22" -adler32 = "1.0.2" crc = "^1.0.0" miniz_oxide = { path = "miniz_oxide" } [build-dependencies] -gcc = "0.3" +cc = "1.0" [f...
2
3
4
740ecf613247c8713b09456723dad0fe2874f180
oyvindln
2017-09-27T18:51:48
More documentation
diff --git a/miniz_oxide/src/deflate/mod.rs b/miniz_oxide/src/deflate/mod.rs index 8ff8c8d..f52b4ab 100644 --- a/miniz_oxide/src/deflate/mod.rs +++ b/miniz_oxide/src/deflate/mod.rs @@ -1,3 +1,5 @@ +//! This module contains functionality for compressing data. + use libc::{c_int, c_void}; mod tdef_oxide; @@ -7,37 +9,...
4
145
37
8bbcda0b94bff013d3722a8356af953085566d93
oyvindln
2017-09-15T19:03:07
Add inner compress_fast function to improve decomp speed This improves decompression speed a fair bit, especially with non-wrapping buffers. It's less effective when using wrapping buffers at the moment, as it's only used when one is 32k bytes into the buffer to avoid panicking on matches that wrap around.
diff --git a/miniz_oxide/src/inflate/tinfl_oxide.rs b/miniz_oxide/src/inflate/tinfl_oxide.rs index 75817a9..a9fb3eb 100644 --- a/miniz_oxide/src/inflate/tinfl_oxide.rs +++ b/miniz_oxide/src/inflate/tinfl_oxide.rs @@ -44,6 +44,14 @@ pub enum State { DistanceOutOfBounds, BadRawLength, BadCodeSizeDistPrevLo...
1
278
19
1a378cd2d625c192ba7e535cc67e519fd16492f5
oyvindln
2017-09-15T17:12:40
Add file missing from last 2 commits
diff --git a/miniz_oxide/src/shared.rs b/miniz_oxide/src/shared.rs new file mode 100644 index 0000000..218f277 --- /dev/null +++ b/miniz_oxide/src/shared.rs @@ -0,0 +1,13 @@ +use adler32::RollingAdler32; +use libc::{c_uint, c_ulong}; + +pub const MZ_ADLER32_INIT: c_ulong = 1; + +pub const HUFFMAN_LENGTH_ORDER: [u8; 19]...
1
13
0
bdc7b8614ca45f826dfb5b99a0c10181554dde8a
oyvindln
2017-09-14T19:17:49
Some minor cleanups
diff --git a/miniz_oxide/src/deflate/tdef_oxide.rs b/miniz_oxide/src/deflate/tdef_oxide.rs index b81ee5d..53b39c2 100644 --- a/miniz_oxide/src/deflate/tdef_oxide.rs +++ b/miniz_oxide/src/deflate/tdef_oxide.rs @@ -6,13 +6,14 @@ use super::{CompressionLevel, CompressionStrategy}; use super::deflate_flags::*; use super:...
6
50
38
67c7344a7752c32651601f495d8396ee4b2bb40d
oyvindln
2017-09-13T23:00:25
Fix some clippy issues in c api
diff --git a/src/tdef/mod.rs b/src/tdef/mod.rs index c200a47..a908f4d 100755 --- a/src/tdef/mod.rs +++ b/src/tdef/mod.rs @@ -23,7 +23,7 @@ pub unsafe extern "C" fn tdefl_compress( } Some(compressor) => { let callback_res = CallbackOxide::new( - compressor.callback_func().ma...
2
3
3
b42c7ba6d952a4f2fe14ec4dbf5ec2d0440826e1
oyvindln
2017-09-13T22:13:47
Fix a bunch of clippy warnings
diff --git a/miniz_oxide/src/deflate/mod.rs b/miniz_oxide/src/deflate/mod.rs index 4cad4f8..f54cb2a 100755 --- a/miniz_oxide/src/deflate/mod.rs +++ b/miniz_oxide/src/deflate/mod.rs @@ -7,14 +7,14 @@ pub type PutBufFuncPtrNotNull = unsafe extern "C" fn(*const c_void, c_int, *mut pub type PutBufFuncPtr = Option<PutBufFu...
5
62
70
6bdfcc5ccfe5cc99974e846b2796921612f7c8d6
oyvindln
2017-09-08T20:49:22
Don't use memcpy for matches on non-x86 for now.
diff --git a/src/tinfl/tinfl_oxide.rs b/src/tinfl/tinfl_oxide.rs index 58571ef..bac3b7f 100644 --- a/src/tinfl/tinfl_oxide.rs +++ b/src/tinfl/tinfl_oxide.rs @@ -911,13 +911,19 @@ pub fn decompress_oxide( { let out_slice = out_buf.get_mut(); ...
1
11
4
c594ded57dda25fbe1bf0856c4224fefd7140d40
oyvindln
2017-09-08T20:40:27
Simplify match copies a little
diff --git a/src/tinfl/tinfl_oxide.rs b/src/tinfl/tinfl_oxide.rs index bcc2e1f..58571ef 100644 --- a/src/tinfl/tinfl_oxide.rs +++ b/src/tinfl/tinfl_oxide.rs @@ -138,24 +138,6 @@ fn transfer_unaligned_u64(buf: &mut &mut[u8], from: isize, to: isize) { }; } -/// Copy data from src to dst. -#[inline] -fn copy_data(...
1
7
29
c1ca84f202e458df1fa3bbf395d0c4075363e313
oyvindln
2017-09-08T19:56:04
Use enum for state
diff --git a/src/lib_oxide.rs b/src/lib_oxide.rs index b17e64c..a446ca5 100644 --- a/src/lib_oxide.rs +++ b/src/lib_oxide.rs @@ -318,7 +318,7 @@ pub fn mz_inflate_init2_oxide(stream_oxide: &mut StreamOxide<inflate_state>, stream_oxide.state.alloc_state::<inflate_state>()?; let state = stream_oxide.state.as_...
3
137
131
253af6077833636b9ac7748d52542ba7577ac1f3
oyvindln
2017-09-08T16:35:56
Simplify failure cond a little and use local for counter in loop
diff --git a/src/tinfl/tinfl_oxide.rs b/src/tinfl/tinfl_oxide.rs index a68e76f..6f1ca18 100644 --- a/src/tinfl/tinfl_oxide.rs +++ b/src/tinfl/tinfl_oxide.rs @@ -926,8 +926,8 @@ pub fn decompress_oxide( } else { { let out_slice = out_buf.get_mut(...
1
14
13
f60ad6071973e7b64381c7f58c019f86f23ae01e
oyvindln
2017-09-08T14:52:36
Use smaller types for state and constant tables
diff --git a/src/tinfl/mod.rs b/src/tinfl/mod.rs index d6f8eec..6478c4f 100755 --- a/src/tinfl/mod.rs +++ b/src/tinfl/mod.rs @@ -129,7 +129,7 @@ pub const TDEFL_FILTER_MATCHES: u32 = 0x20000; pub const TDEFL_FORCE_ALL_STATIC_BLOCKS: u32 = 0x40000; pub const TDEFL_FORCE_ALL_RAW_BLOCKS: u32 = 0x80000; -const MIN_TABL...
2
45
43
926130a7214888fcde41a4fbe27c4e7e3c9ea0d1
oyvindln
2017-09-07T21:12:10
Fix bug - lookahead wasn't written back before flush_block This caused overflow on files that didn't compress well
diff --git a/src/lib.rs b/src/lib.rs index 3198b73..3bd4fd7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -159,6 +159,7 @@ pub unsafe extern "C" fn miniz_def_realloc_func( libc::realloc(address, items * size) } +#[cfg(feature = "build_non_rust")] #[no_mangle] pub unsafe extern "C" fn mz_adler32(adler: c_ulong, ...
3
33
11
8e4bf7c48697a288d700c8486170e202bc971ce7
oyvindln
2017-09-06T14:46:19
Use buffer struct instead of cursor ++ This avoids using a 64-bit value for position on 32-bit and, improves performance a little on 32-bit. Remove unused constant. Fix use of deprecated gcc function. Mask block type select. Use smaller data type for enum and return a plain 32-bit int instead. Enums over ffi are ...
diff --git a/src/build.rs b/src/build.rs index 78d6086..8931cd3 100644 --- a/src/build.rs +++ b/src/build.rs @@ -3,11 +3,12 @@ extern crate gcc; #[cfg(all(not(feature = "fuzzing"), not(feature = "bench"), feature = "build_non_rust"))] fn main() { - gcc::compile_library("libminiz.a", - &["...
4
127
64
843c3ed2da844d56b7964cdab5b436f7ba9fd6d0
Frommi
2017-09-03T20:08:44
u64 trailing_zeros trick for compress_fast; +3 instead of +2 init pos in fast match search because trigram was tested
diff --git a/src/tdef/tdef_oxide.rs b/src/tdef/tdef_oxide.rs index 4dcb74a..e5f71f6 100644 --- a/src/tdef/tdef_oxide.rs +++ b/src/tdef/tdef_oxide.rs @@ -1351,31 +1351,28 @@ pub fn compress_fast(d: &mut CompressorOxide, callback: &mut CallbackOxide) -> b probe_pos &= TDEFL_LZ_DICT_SIZE_MASK; ...
1
20
23
ebd6280d530d57be8728e057cd448e05b58bd6e4
Frommi
2017-09-03T19:32:18
cursor write_all method -> write_byte function; wrong level in fast compression bench
diff --git a/benches/bench.rs b/benches/bench.rs index e7e2aec..f25a825 100755 --- a/benches/bench.rs +++ b/benches/bench.rs @@ -102,7 +102,7 @@ fn compress_mem_to_heap_fast_oxide(b: &mut Bencher) { let input = get_test_data(); let mut out_len: usize = 0; - let flags = tdefl_create_comp_flags_from_zip_pa...
2
12
12
1996b8d908213223b0a816217af0b1153fb5b74e
oyvindln
2017-09-03T17:02:30
Add decompress_mem_to_heap_oxide bench + avoid leaks in benches
diff --git a/Cargo.toml b/Cargo.toml index 43f2813..dcf1823 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,3 +27,4 @@ build_non_rust = [] [profile.dev] panic = "abort" + diff --git a/benches/bench.rs b/benches/bench.rs index e7e2aec..68129da 100755 --- a/benches/bench.rs +++ b/benches/bench.rs @@ -6,6 +6,7 @@ exte...
3
78
22
a5816336ae0ed171cea46472ccf8cb8821eda0ff
Frommi
2017-09-02T20:00:43
remove now redundunt loop and counter stack copy; return commented test
diff --git a/src/tinfl/tinfl_oxide.rs b/src/tinfl/tinfl_oxide.rs index 4721529..ec33a06 100644 --- a/src/tinfl/tinfl_oxide.rs +++ b/src/tinfl/tinfl_oxide.rs @@ -961,32 +961,23 @@ pub fn decompress_oxide( } out_pos += match_len; ...
1
46
58
3f61329c1b18de5e3dcd518f4cf4b10a85c4c9e5
oyvindln
2017-08-30T15:50:35
Fix compile error and warning on 32-bit
diff --git a/src/lib.rs b/src/lib.rs index 791d922..3904bf9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -309,6 +309,19 @@ pub unsafe extern "C" fn mz_compress( mz_compress2(dest, dest_len, source, source_len, CompressionLevel::DefaultCompression as c_int) } +#[cfg(target_bit_width = "64")] +#[inline] +fn buffer...
2
19
5
4ed7ad35fe2a416114096b375ed032130974b98c
Frommi
2017-08-30T15:13:22
tinfl optimize: macro generate_state; vars copy to stack
diff --git a/src/tinfl/tinfl_oxide.rs b/src/tinfl/tinfl_oxide.rs index 86eb53a..0805507 100644 --- a/src/tinfl/tinfl_oxide.rs +++ b/src/tinfl/tinfl_oxide.rs @@ -183,7 +183,7 @@ fn validate_zlib_header(cmf: u32, flg: u32, flags: u32, mask: usize) -> Action { } -enum Action { +pub enum Action { None, Next,...
1
291
242
3b3f17f9e4b55ab3c960ba9aeb3ddb2f1f2ac83d
oyvindln
2017-08-30T14:16:46
Fix missing colon that for some reason compiled on nightly but not stable
diff --git a/src/tdef/tdef_oxide.rs b/src/tdef/tdef_oxide.rs index 29fefef..4dcb74a 100644 --- a/src/tdef/tdef_oxide.rs +++ b/src/tdef/tdef_oxide.rs @@ -177,7 +177,7 @@ impl<'a> CallbackOxide<'a> { out_size.map(|size| *size = 0); return Err(TDEFLStatus::BadParam); ...
1
1
1
b37bfd64c802692e83c23300c28dfc956155431c
Frommi
2017-08-29T15:35:15
counter to laval variable and faster action reaction in WRITE_LEN_BYTES_TO_END
diff --git a/src/tinfl/tinfl_oxide.rs b/src/tinfl/tinfl_oxide.rs index d49e49a..86eb53a 100644 --- a/src/tinfl/tinfl_oxide.rs +++ b/src/tinfl/tinfl_oxide.rs @@ -878,8 +878,6 @@ pub fn decompress_oxide( let match_end_pos = cmp::max(source_pos, out_buf.position() as usize) + ...
1
28
17
532b79276104521a8a246fdfab3f617a98d1d924
Frommi
2017-08-29T09:54:30
put some compressor fields to local variables
diff --git a/src/tdef/tdef_oxide.rs b/src/tdef/tdef_oxide.rs index fab16dc..29fefef 100644 --- a/src/tdef/tdef_oxide.rs +++ b/src/tdef/tdef_oxide.rs @@ -792,9 +792,9 @@ impl DictOxide { p += 8; q += 8; } else { - let leading = xor_data.traili...
1
99
58
eba87c79cdd243b0da8d72da43e4542d9ec2186d
Frommi
2017-08-28T11:48:57
optimize find_match in tdef by using trailing_zeros on 64bit xor of data to pinpoint first different byte location
diff --git a/src/tdef/tdef_oxide.rs b/src/tdef/tdef_oxide.rs index 595cfb2..42c510b 100644 --- a/src/tdef/tdef_oxide.rs +++ b/src/tdef/tdef_oxide.rs @@ -759,7 +759,7 @@ impl DictOxide { let s01: u16 = self.read_unaligned(pos as isize); if max_match_len <= match_len { return (match_dist, match_len) }...
1
23
25
8fa60bb77f48f71ce1e5aeeeb6966e822579f13a
oyvindln
2017-08-27T13:13:27
Optimize match copying slightly
diff --git a/src/tinfl/tinfl_oxide.rs b/src/tinfl/tinfl_oxide.rs index 29ee0d6..d49e49a 100644 --- a/src/tinfl/tinfl_oxide.rs +++ b/src/tinfl/tinfl_oxide.rs @@ -3,11 +3,6 @@ use super::*; use std::io::Write; use std::{cmp, slice, ptr}; -#[inline] -pub fn memset<T : Copy>(slice: &mut [T], val: T) { - for x in sli...
1
48
14
0df32e745bbc94647cb0019dfe7c72da975afc6d
oyvindln
2017-08-26T13:13:11
Avoid bounds checks when looking up base/extra values in static tables
diff --git a/src/tinfl/tinfl_oxide.rs b/src/tinfl/tinfl_oxide.rs index 01d8c42..29ee0d6 100644 --- a/src/tinfl/tinfl_oxide.rs +++ b/src/tinfl/tinfl_oxide.rs @@ -47,15 +47,18 @@ const HUFF_DECODE_OUTER_LOOP1: u32 = 101; const HUFF_DECODE_OUTER_LOOP2: u32 = 102; // Not sure why miniz uses 32-bit values for these, may...
1
23
9
980aa1901122c4e4e31dfef459df63492b70edf5
oyvindln
2017-08-26T12:07:42
Improve write_byte performance, add zlib benches Made write_byte faster by not using `write_all`/`write` as that doesn't optimize properly.
diff --git a/benches/bench.rs b/benches/bench.rs index 12c22f6..facab14 100755 --- a/benches/bench.rs +++ b/benches/bench.rs @@ -6,7 +6,7 @@ extern crate test; use test::Bencher; use std::io::Read; -use miniz_oxide::{decompress_to_vec, compress_to_vec}; +use miniz_oxide::{decompress_to_vec, compress_to_vec, compres...
2
32
5
a7cafcdb452d087e8912453c7e0fd163453d3f34
oyvindln
2017-08-26T11:09:19
Add benches and test
diff --git a/benches/bench.rs b/benches/bench.rs new file mode 100755 index 0000000..12c22f6 --- /dev/null +++ b/benches/bench.rs @@ -0,0 +1,61 @@ +#![feature(test)] + +extern crate miniz_oxide; +extern crate test; + +use test::Bencher; +use std::io::Read; + +use miniz_oxide::{decompress_to_vec, compress_to_vec}; + +fn...
2
91
0
57e15ff84476a2c551782b608462bda2dff5405b
oyvindln
2017-08-25T20:33:58
Add a few tests and simple rust compress/decompress functions In preparation for adding benchmarks
diff --git a/src/lib.rs b/src/lib.rs index fc86e19..791d922 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -22,6 +22,8 @@ pub use tdef::{ tdefl_compress_mem_to_output, tdefl_compress_mem_to_heap, tdefl_compress_mem_to_mem, + compress_to_vec, + compress_to_vec_zlib, PutBufFuncPtr }; @@ -33,6 +3...
3
173
0
2d0583cf3aad1c6040fd811358465721905abb88
oyvindln
2017-08-24T19:09:10
Avoid linking to libminiz, rust version of alloc functions
diff --git a/Cargo.toml b/Cargo.toml index a9b9ee5..c8dea67 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,6 @@ name = "miniz_oxide" version = "0.1.0" build = "src/build.rs" -links = "miniz" license = "MIT" authors = ["Frommi <daniil.liferenko@gmail.com>"] @@ -21,8 +20,9 @@ crc = "^1.0.0" gcc = "0.3" [f...
4
35
4
c62f3434e6abf180d2a21a6d8bc20eccaa4d8049
oyvindln
2017-08-23T16:52:12
Catch panics when called from C API + fix wrapping buffer match copy issue
diff --git a/src/lib.rs b/src/lib.rs index 71e1f42..9207f70 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,11 +2,9 @@ extern crate libc; extern crate adler32; extern crate crc; -use std::slice; -use std::ptr; -use std::mem; -use std::cmp; +use std::{slice, ptr, mem, cmp}; use std::io::Cursor; +use std::panic::{cat...
2
28
14
a9c6af38bacc63b8b46c43f3ae7308ae84ce2923
Frommi
2017-08-23T12:20:34
adler32 and crc32 extern crates
diff --git a/Cargo.toml b/Cargo.toml index c792be2..a9b9ee5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,9 @@ name = "miniz_oxide" crate-type = ['staticlib', 'rlib'] [dependencies] -libc="0.2.22" +libc = "0.2.22" +adler32 = "1.0.2" +crc = "^1.0.0" [build-dependencies] gcc = "0.3" diff --git a/src/lib.r...
3
14
16
2a13af5b578ef029f7c559b89d043bcbf4b95270
oyvindln
2017-08-21T20:50:57
Fix issue caused by lookup of code at the last two bytes being wrong. Tests haven't failed so far, but not done running through the zip archive and truncate one yet.
diff --git a/src/tinfl/tinfl_oxide.rs b/src/tinfl/tinfl_oxide.rs index 87eae67..8b20687 100644 --- a/src/tinfl/tinfl_oxide.rs +++ b/src/tinfl/tinfl_oxide.rs @@ -189,7 +189,7 @@ fn decode_huffman_code<F>( let mut code_len = TINFL_FAST_LOOKUP_BITS as u32; loop { ...
1
1
5