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 |
|---|---|---|---|---|---|---|---|
e6ee54e82c16ddccb6b55d5a20b8aa5cb4669ca0 | oyvindln | 2024-12-16T15:15:06 | fix(inflate): use built in fill instead of custom memset function | diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.rs
index f1e90c8..754d2ac 100644
--- a/miniz_oxide/src/inflate/core.rs
+++ b/miniz_oxide/src/inflate/core.rs
@@ -407,14 +407,6 @@ const fn num_extra_bits_for_distance_code(code: u8) -> u8 {
/// The mask used when indexing the base/extra arrays... | 1 | 10 | 21 |
f6c3b459263e430a868b95d06487509e695dfa94 | oyvindln | 2024-12-16T14:41:38 | fix(c_api): use correct cfg for pointer width | diff --git a/src/lib.rs b/src/lib.rs
index 438fddb..d71d033 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -297,13 +297,13 @@ unmangle!(
}
);
-#[cfg(target_bit_width = "64")]
+#[cfg(target_pointer_width = "64")]
#[inline]
fn buffer_too_large(source_len: c_ulong, dest_len: c_ulong) -> bool {
(source_len | de... | 1 | 2 | 2 |
b3b16048bd459782964f10a23aef63bf058389d5 | oyvindln | 2024-12-16T14:31:16 | fix(inflate): skip pointlessly clearing unused huffman code length tree | diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.rs
index 146c4fd..f1e90c8 100644
--- a/miniz_oxide/src/inflate/core.rs
+++ b/miniz_oxide/src/inflate/core.rs
@@ -750,7 +750,14 @@ fn init_tree(r: &mut DecompressorOxide, l: &mut LocalVars) -> Option<Action> {
// and can instead error o... | 1 | 8 | 1 |
f73e6a4600fbfa795d500d45caef4d48f8c85eff | oyvindln | 2024-12-15T20:13:54 | fix(inflate): fill fast lookup table with invalid code value instead of zero so we can avoid check in hot code path givin a small performance boost | diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.rs
index ac91201..146c4fd 100644
--- a/miniz_oxide/src/inflate/core.rs
+++ b/miniz_oxide/src/inflate/core.rs
@@ -77,17 +77,14 @@ impl HuffmanTable {
///
/// It's possible we could avoid checking for 0 if we can guarantee a sane table.... | 2 | 118 | 74 |
083e4b3e66e9e4e45e7c48a56481d62ee6a78bce | oyvindln | 2024-12-01T15:34:39 | fix(inflate): don't use lookup table on aarch64 and loong since we have bit rev instruction there, fix clippy warnings and fix conditional in tree_lookup that seemed to break perf | diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs
index 8aedf7d..e3b03b0 100644
--- a/miniz_oxide/src/deflate/core.rs
+++ b/miniz_oxide/src/deflate/core.rs
@@ -556,7 +556,7 @@ pub struct CallbackFunc<'a> {
pub put_buf_func: &'a mut dyn FnMut(&[u8]) -> bool,
}
-impl<'a> CallbackFunc<... | 2 | 25 | 11 |
c5f8f761148a3a8a0a7f1b42e698c5e630a8cdf6 | oyvindln | 2024-12-01T14:53:06 | fix(infalte): use smaller types in inflate struct, split up huffman table arrays to make struct smaller, make zlib level 0 if using rle, other minor tweaks | diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs
index 9beafa9..8aedf7d 100644
--- a/miniz_oxide/src/deflate/core.rs
+++ b/miniz_oxide/src/deflate/core.rs
@@ -306,7 +306,7 @@ pub(crate) const MAX_MATCH_LEN: usize = 258;
const DEFAULT_FLAGS: u32 = NUM_PROBES[4] | TDEFL_WRITE_ZLIB_HEADER;
... | 2 | 73 | 54 |
02a88571dcc58182df15abb5c1b0410bbd5db428 | oyvindln | 2024-11-25T12:34:50 | fix(deflate) set min window bits in inflate header when using rle | diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs
index 3e822a2..9beafa9 100644
--- a/miniz_oxide/src/deflate/core.rs
+++ b/miniz_oxide/src/deflate/core.rs
@@ -206,6 +206,13 @@ pub enum CompressionStrategy {
Fixed = 4,
}
+impl From<CompressionStrategy> for i32 {
+ #[inline(always... | 2 | 77 | 7 |
423bdf84360c087bea6d3e2b463f3c3a2c1a2867 | oyvindln | 2024-11-19T23:39:42 | fix(inflate): use inputwrapper struct instead of iter to simplify input reading and change some data types for performance | diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.rs
index 857e0d6..6a068ea 100644
--- a/miniz_oxide/src/inflate/core.rs
+++ b/miniz_oxide/src/inflate/core.rs
@@ -4,10 +4,10 @@ use super::*;
use crate::shared::{update_adler32, HUFFMAN_LENGTH_ORDER};
use ::core::cell::Cell;
+use ::core::cmp... | 2 | 106 | 66 |
9f1fc5e5aeee4ce54be3a766e259b030f3b3cfa9 | oyvindln | 2024-11-04T22:51:15 | fix(inflate): use function instead of lookup table for distance extra bits for tiny space/perf saving and fix clippy warnings | diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.rs
index f93e5de..857e0d6 100644
--- a/miniz_oxide/src/inflate/core.rs
+++ b/miniz_oxide/src/inflate/core.rs
@@ -99,7 +99,7 @@ const MAX_HUFF_SYMBOLS_0: usize = 288;
/// The length of the second (distance) huffman table.
const MAX_HUFF_SYMBOL... | 4 | 100 | 32 |
0a33effd414711b379e01b0613ba5ae85a0e14d0 | Phil Hord | 2024-10-04T20:19:42 | Derive Clone for InflateState to allow random-access reads (#157)
I am implementing Seek for a wrapper that reads deflated files. To do this, I will
inflate the file once and save the dictionary and inflate state at several points in
the file. Later, when I want to seek to some random place in the file, I will use... | diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.rs
index 738de23..f93e5de 100644
--- a/miniz_oxide/src/inflate/core.rs
+++ b/miniz_oxide/src/inflate/core.rs
@@ -12,6 +12,7 @@ use self::output_buffer::OutputBuffer;
pub const TINFL_LZ_DICT_SIZE: usize = 32_768;
/// A struct containing huff... | 2 | 66 | 0 |
b2123715e2f10f29548b3124b2ea0ce91aad8c27 | oyvindln | 2024-08-08T17:12:39 | fix(miniz_oxide): update edition, make more functions const, fix warning, update to adler2 | diff --git a/miniz_oxide/Cargo.toml b/miniz_oxide/Cargo.toml
index 8a42c1d..84925b4 100644
--- a/miniz_oxide/Cargo.toml
+++ b/miniz_oxide/Cargo.toml
@@ -10,14 +10,14 @@ repository = "https://github.com/Frommi/miniz_oxide/tree/master/miniz_oxide"
homepage = "https://github.com/Frommi/miniz_oxide/tree/master/miniz_oxide... | 4 | 15 | 10 |
d1de8dba2e2bbea6452c9a1d78b221a0f41dadd2 | oyvindln | 2024-06-07T18:20:29 | fix(miniz_oxide): evade bounds checks in record_match to improve compression performance a little | diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs
index 6deddd0..4bc2bff 100644
--- a/miniz_oxide/src/deflate/core.rs
+++ b/miniz_oxide/src/deflate/core.rs
@@ -1464,7 +1464,6 @@ struct LZOxide {
pub flag_position: usize,
// The total number of bytes in the current block.
- //... | 1 | 11 | 7 |
b4baed337a70c317c5d6a2fa245bda21f461fc6b | oyvindln | 2024-05-29T00:33:44 | feat(deflate): evade a bounds check in deflate for a small perf improvement | diff --git a/benches/bench.rs b/benches/bench.rs
index 94bcb23..d3b3ab8 100755
--- a/benches/bench.rs
+++ b/benches/bench.rs
@@ -107,6 +107,12 @@ mod oxide {
1,
"benches/data/bin"
);
+ compress_bench!(
+ compress_bin_lvl_2,
+ tdefl_compress_mem_to_heap,
+ 2,
+ "benc... | 2 | 12 | 0 |
2ba520a458704e9fd12817fd2e945d869502c59c | oyvindln | 2024-05-28T01:46:54 | fix(miniz_oxide): simplify init_tree a little and use a smaller lookup table for bit reversal | diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.rs
index 8a20884..d9a4950 100644
--- a/miniz_oxide/src/inflate/core.rs
+++ b/miniz_oxide/src/inflate/core.rs
@@ -680,16 +680,20 @@ fn start_static_table(r: &mut DecompressorOxide) {
#[cfg(feature = "rustc-dep-of-std")]
fn reverse_bits(n: u3... | 1 | 17 | 13 |
2f0a9a3b4f2bc49c44efa3fa9e3afada893ab775 | oyvindln | 2024-05-17T19:08:45 | disable c miniz part in miniz_oxide_c_api of bench | diff --git a/benches/bench.rs b/benches/bench.rs
index ceb2f22..94bcb23 100755
--- a/benches/bench.rs
+++ b/benches/bench.rs
@@ -222,7 +222,7 @@ mod oxide {
);
}
-mod miniz {
+/*mod miniz {
use super::*;
use libc::{c_int, c_void};
@@ -380,7 +380,7 @@ mod miniz {
9,
"benches/data/co... | 1 | 2 | 2 |
963a9babcda98f89f360d5ae2d1a4fd692d8355e | oyvindln | 2024-05-17T18:13:48 | fix(miniz_oxide_c_api): set version of cc so ci tests don't fail due to newer version of cc not supporting 1.50 | diff --git a/Cargo.toml b/Cargo.toml
index 137d8ba..2da2f2e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -22,6 +22,7 @@ name = "miniz_oxide_c_api"
#CRATE_TYPE
[dependencies]
+cc = "1.0.83"
libc = "0.2.22"
crc32fast = "1.2.0"
miniz_oxide = { path = "miniz_oxide", version = "0.7.1" } | 1 | 1 | 0 |
434d9abff04421355a76b87eb632e3fbab917268 | Gnome! | 2024-05-17T17:41:48 | Remove lookup table from rustc-std builds (#152) | diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.rs
index ce9540f..8a20884 100644
--- a/miniz_oxide/src/inflate/core.rs
+++ b/miniz_oxide/src/inflate/core.rs
@@ -678,17 +678,27 @@ fn start_static_table(r: &mut DecompressorOxide) {
memset(&mut r.tables[DIST_TABLE].code_size[0..32], 5);
}... | 1 | 20 | 10 |
35c71e1d4b20f03936fb690793103b636f1b0038 | Daniel Müller | 2024-04-08T18:13:07 | fix(miniz_oxide): Fix version specification for simd-adler32 (#150)
The crate requires simd-adler32 in version 0.3.3 at a minimum, as that
is when the simd_adler32::Adler32::from_checksum constructor was
introduced. Fix the version specification accordingly.
Signed-off-by: Daniel Müller <deso@posteo.net> | diff --git a/miniz_oxide/Cargo.toml b/miniz_oxide/Cargo.toml
index f104ef2..5910c03 100644
--- a/miniz_oxide/Cargo.toml
+++ b/miniz_oxide/Cargo.toml
@@ -18,7 +18,7 @@ name = "miniz_oxide"
[dependencies]
adler = { version = "1.0", default-features = false }
-simd-adler32 = { version = "0.3", default-features = false... | 1 | 1 | 1 |
79307d7bd6e4aa3e86b30fd225a00ecb412188a4 | oyvindln | 2024-02-03T22:09:41 | fix tests on rust 1.50 | diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.rs
index 9b90596..b53ddde 100644
--- a/miniz_oxide/src/inflate/core.rs
+++ b/miniz_oxide/src/inflate/core.rs
@@ -1829,7 +1829,7 @@ mod test {
let mut b_buf = [0; LEN];
// This should fail with the out buffer being to small.
... | 1 | 3 | 3 |
657c5b25760a65cdebe0f66e885d813b488ecd6f | oyvindln | 2024-01-30T22:54:22 | fix more warnings | diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs
index dd87375..0414004 100644
--- a/miniz_oxide/src/deflate/core.rs
+++ b/miniz_oxide/src/deflate/core.rs
@@ -1255,7 +1255,6 @@ impl DictOxide {
/// type T.
#[inline]
fn read_unaligned_u64(&self, pos: usize) -> u64 {
- ... | 1 | 10 | 11 |
0f50464c6f7eebdf50942d575db4fbf159436167 | oyvindln | 2024-01-30T22:49:57 | fix(inflate): Return MZError::Buf when calling inflate with MZFlush::Finish in line with orig miniz and zlib
also fixes some clippy warnings and adds a test for it
Closes #143 | diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs
index 3590bb5..dd87375 100644
--- a/miniz_oxide/src/deflate/core.rs
+++ b/miniz_oxide/src/deflate/core.rs
@@ -341,7 +341,7 @@ mod zlib {
/// dictionary.
fn header_from_level(level: u8) -> [u8; 2] {
let cmf = DEFAULT_CMF;
-... | 4 | 90 | 52 |
10ff5a0824a800d2df688894c904ebfc1b2a2dce | Kornel | 2024-01-29T13:29:27 | Optimize match_len == 3 (#146)
* Add throughput to benches
* Trim debug/error fmt
* Amortize bounds checks in apply_match fast path
* Avoid panic in tree_lookup | diff --git a/benches/bench.rs b/benches/bench.rs
index d30deaa..c71e9fa 100755
--- a/benches/bench.rs
+++ b/benches/bench.rs
@@ -50,6 +50,7 @@ macro_rules! decompress_bench {
let compressed = compress_to_vec(input.as_slice(), $level);
let mut out_len: usize = 0;
+ b.bytes = input.... | 4 | 30 | 8 |
201ef393a84c858c78567a304b18439b3db9279c | Kornel | 2024-01-28T13:53:19 | Code size reduction from panic reduction (#145)
* Move misplaced doccomment
* Avoid slice_start_index_len_fail
* Make init_tree fallible
* Add bounds checks to init_tree
This eliminates costlier implicit panicking bounds checks
* Reduce panics in compress_to_vec_inner | diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs
index d2db260..3590bb5 100644
--- a/miniz_oxide/src/deflate/core.rs
+++ b/miniz_oxide/src/deflate/core.rs
@@ -414,6 +414,8 @@ const fn read_u16_le(slice: &[u8], pos: usize) -> u16 {
pub struct CompressorOxide {
lz: LZOxide,
params... | 4 | 55 | 34 |
ee29e371237b01ddbadd4c0709f2d30447f2430c | Sergey "Shnatsel" Davidoff | 2023-04-11T20:30:22 | Add a roundtrip fuzz target (#138) | diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml
index 39667d5..ade0dcb 100644
--- a/fuzz/Cargo.toml
+++ b/fuzz/Cargo.toml
@@ -26,11 +26,14 @@ members = ["."]
name = "fuzz_high"
path = "fuzz_targets/fuzz_high.rs"
-[features]
-default = ["fuzzing"]
-fuzzing = ["miniz_oxide_c_api/fuzzing"]
-
-
[[bin]]
name = "inflate... | 2 | 19 | 5 |
a65d0751f83c4e518cfecbf18e19de22692ae2b7 | Jason Ish | 2023-02-02T15:03:36 | Fix for older version of Rust (#136)
abs_diff didn't become stable until Rust 1.60, however the README states
that 0.6 of miniz_oxide has a MSRV of 1.40.
Issue #135 | diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.rs
index af9d879..6db2449 100644
--- a/miniz_oxide/src/inflate/core.rs
+++ b/miniz_oxide/src/inflate/core.rs
@@ -821,7 +821,12 @@ fn transfer(
// special case that comes up surprisingly often. in the case that `source_pos`
// is 1 les... | 1 | 7 | 2 |
b6d8824a316522c292968f807c6455c1ec421bea | Connor Skees | 2023-02-01T21:21:30 | move debug assert condition to if stmt (#134) | diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.rs
index 25ba90f..af9d879 100644
--- a/miniz_oxide/src/inflate/core.rs
+++ b/miniz_oxide/src/inflate/core.rs
@@ -818,11 +818,10 @@ fn transfer(
match_len: usize,
out_buf_size_mask: usize,
) {
- debug_assert!(out_pos > source_pos);... | 1 | 2 | 3 |
008151c5e48b06eead523fd66b3609f31ce529a8 | oyvindln | 2023-02-01T19:27:17 | fix c_api dep version | diff --git a/Cargo.toml b/Cargo.toml
index 3ef671b..c2fbfb5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -24,7 +24,7 @@ name = "miniz_oxide_c_api"
[dependencies]
libc = "0.2.22"
crc32fast = "1.2.0"
-miniz_oxide = { path = "miniz_oxide", version = "0.7.0" }
+miniz_oxide = { path = "miniz_oxide", version = "0.6.3" }
... | 1 | 1 | 1 |
bf660972bcad23717e811e44b7ad8388ba5f29ec | Connor Skees | 2023-01-10T23:19:58 | optimize `inflate::core::init_tree` by precomputing reversed bits (#132)
* optimize inflate::core::init_tree
* revert total_symbols loop optimization
bug appeared when running `cargo t --all`. the solution to use `.sum()` on the iterator makes it slightly slower, so just completely reverting
* use const fn to... | diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.rs
index 3b7807e..25ba90f 100644
--- a/miniz_oxide/src/inflate/core.rs
+++ b/miniz_oxide/src/inflate/core.rs
@@ -672,6 +672,18 @@ fn start_static_table(r: &mut DecompressorOxide) {
memset(&mut r.tables[DIST_TABLE].code_size[0..32], 5);
}
... | 1 | 23 | 4 |
dd2fa3e33c7d8ce1bb8bbd7329a0dd571f4e2df6 | Connor Skees | 2023-01-09T12:24:19 | optimize inflate::core::transfer (#131) | diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.rs
index f8ef733..3b7807e 100644
--- a/miniz_oxide/src/inflate/core.rs
+++ b/miniz_oxide/src/inflate/core.rs
@@ -799,13 +799,34 @@ fn transfer(
match_len: usize,
out_buf_size_mask: usize,
) {
- for _ in 0..match_len >> 2 {
- ... | 1 | 28 | 8 |
c9128cb19bffd0e6560048b5c42a4029460f1cf6 | oyvindln | 2022-12-22T17:56:44 | Fix warnings in miniz_oxide_c_api | diff --git a/benches/bench.rs b/benches/bench.rs
index 985c850..d30deaa 100755
--- a/benches/bench.rs
+++ b/benches/bench.rs
@@ -224,10 +224,10 @@ mod miniz {
use super::*;
use libc::{c_int, c_void};
- /// Functions from miniz
- /// We add the link attribute to make sure
- /// these are linked to t... | 3 | 6 | 6 |
f4ee585eb382eeb7ea1db16458438c637de48349 | oyvindln | 2022-12-22T17:48:13 | fix(inflate): Reject input with too many litlen codes as per spec/zlib
fixes #130 | diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.rs
index 66424a6..f8ef733 100644
--- a/miniz_oxide/src/inflate/core.rs
+++ b/miniz_oxide/src/inflate/core.rs
@@ -261,6 +261,7 @@ impl Default for DecompressorOxide {
}
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
+#[non_exhaustive]
enum St... | 2 | 33 | 4 |
c7643aa2ddd5c2ca45f6f506b281ee988ea8a296 | Jeff Muizelaar | 2022-09-15T06:19:04 | Remove #[inline(always)] from CompressorOxide::default() (#125)
With #[inline(always)] the body of default() will be inlined into
external crates but the body will still contain calls to the
LZOxide::new(), ParamsOxide::new(DEFAULT_FLAGS), Box::default() and
DictOxide::new(DEFAULT_FLAGS). This ends up causing a cop... | diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs
index 91a9bf8..d2db260 100644
--- a/miniz_oxide/src/deflate/core.rs
+++ b/miniz_oxide/src/deflate/core.rs
@@ -517,7 +517,6 @@ impl CompressorOxide {
impl Default for CompressorOxide {
/// Initialize the compressor with a level of 4, zl... | 1 | 0 | 1 |
7a36c576f74719c372e151da3951b82a61682eaa | oyvindln | 2022-09-04T16:24:32 | docs(core):Remoword obsolete info about flate2 use | diff --git a/miniz_oxide/src/lib.rs b/miniz_oxide/src/lib.rs
index fd64932..192f848 100644
--- a/miniz_oxide/src/lib.rs
+++ b/miniz_oxide/src/lib.rs
@@ -1,8 +1,7 @@
//! A pure rust replacement for the [miniz](https://github.com/richgel999/miniz)
//! DEFLATE/zlib encoder/decoder.
-//! The plan for this crate is to be ... | 1 | 2 | 3 |
c52cf711db0dcf38481c7e5e79d4fd60b09728b5 | oyvindln | 2022-09-04T15:54:09 | feat(inflate): add std feature to allow error trait for DecompressError and other stuff later down the line | diff --git a/miniz_oxide/Cargo.toml b/miniz_oxide/Cargo.toml
index 4eda67e..94fb8af 100644
--- a/miniz_oxide/Cargo.toml
+++ b/miniz_oxide/Cargo.toml
@@ -29,6 +29,7 @@ compiler_builtins = { version = '0.1.2', optional = true }
[features]
default = ["with-alloc"]
with-alloc = []
+std = []
# Internal feature, only u... | 3 | 8 | 1 |
b769177650d1ab7ac6b0162232beb2f50bd1127a | Sergey "Shnatsel" Davidoff | 2022-09-04T15:36:59 | impl Display for DecompressError in preparation for impl Error (#123) | diff --git a/miniz_oxide/src/inflate/mod.rs b/miniz_oxide/src/inflate/mod.rs
index 6e8dbe2..aeb4265 100644
--- a/miniz_oxide/src/inflate/mod.rs
+++ b/miniz_oxide/src/inflate/mod.rs
@@ -86,6 +86,21 @@ pub struct DecompressError {
pub output: Vec<u8>,
}
+#[cfg(feature = "with-alloc")]
+impl alloc::fmt::Display fo... | 1 | 15 | 0 |
029d675b007d38b65989408b48dc18af54c4c3fe | oyvindln | 2022-08-25T12:24:57 | fix(inflate): Make building with --no-default-features actually work | diff --git a/miniz_oxide/src/inflate/mod.rs b/miniz_oxide/src/inflate/mod.rs
index 064429a..6e8dbe2 100644
--- a/miniz_oxide/src/inflate/mod.rs
+++ b/miniz_oxide/src/inflate/mod.rs
@@ -86,6 +86,7 @@ pub struct DecompressError {
pub output: Vec<u8>,
}
+#[cfg(feature = "with-alloc")]
fn decompress_error(status: ... | 1 | 1 | 0 |
8179633092b032b783333c73395490b6b9243823 | oyvindln | 2022-08-21T18:39:29 | feat(miniz_oxide) Return currently decompressed data on failure in decompress_to_vec.. functions | diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.rs
index 38bdacb..630e5e6 100644
--- a/miniz_oxide/src/inflate/core.rs
+++ b/miniz_oxide/src/inflate/core.rs
@@ -108,7 +108,7 @@ const HUFFLEN_TABLE: usize = 2;
pub mod inflate_flags {
/// Should we try to parse a zlib header?
///
- ... | 3 | 92 | 26 |
c08ac1c60699025fea9c39250a41be54c6267813 | Sergey "Shnatsel" Davidoff | 2022-08-20T22:46:59 | Fix output size limit handling (#121)
* Hopefully fix the limit handling in decompress_with_limit() functions
* Add a test for decompression limit from #119. It passes!
Thanks, nice work! | diff --git a/miniz_oxide/src/inflate/mod.rs b/miniz_oxide/src/inflate/mod.rs
index 8d9631a..f17817c 100644
--- a/miniz_oxide/src/inflate/mod.rs
+++ b/miniz_oxide/src/inflate/mod.rs
@@ -154,14 +154,12 @@ fn decompress_to_vec_inner(
}
TINFLStatus::HasMoreOutput => {
- // We need... | 2 | 24 | 7 |
d3dee8760fd8b390ca079e8a80cb28f71948c379 | oyvindln | 2022-05-30T20:05:30 | Don't use simd-adler32 when building as part of std | diff --git a/miniz_oxide/Cargo.toml b/miniz_oxide/Cargo.toml
index 9c21ca6..9b68793 100644
--- a/miniz_oxide/Cargo.toml
+++ b/miniz_oxide/Cargo.toml
@@ -31,6 +31,6 @@ default = []
# Internal feature, only used when building as part of libstd, not part of the
# stable interface of this crate.
-rustc-dep-of-std = ['c... | 1 | 1 | 1 |
afa2bc2ceb8c24dbfd4dcf1d7493df97aa0869e0 | Marcel Hellwig | 2022-05-30T19:54:58 | fix some clippy lints (#116) | diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs
index da2dc44..91a9bf8 100644
--- a/miniz_oxide/src/deflate/core.rs
+++ b/miniz_oxide/src/deflate/core.rs
@@ -777,13 +777,13 @@ const DIST_TABLE: usize = 1;
const HUFF_CODES_TABLE: usize = 2;
/// Status of RLE encoding of huffman code le... | 6 | 33 | 29 |
991e3154b49e56cf716e51d1abd0f9c8d704a258 | Michael Mc Donnell | 2022-01-24T23:55:39 | Fix typos (#115)
I fixed a couple of typos. | diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs
index 761584b..da2dc44 100644
--- a/miniz_oxide/src/deflate/core.rs
+++ b/miniz_oxide/src/deflate/core.rs
@@ -476,7 +476,7 @@ impl CompressorOxide {
/// Set the compression level of the compressor.
///
- /// Using this to chan... | 1 | 6 | 6 |
0c07eaf55ff3f9c6d7d0832e69e9dc8e4fa37b62 | oyvindln | 2021-12-04T21:00:33 | refactor(core): Clarify compress function documentation, and run rustfmt on c_api | diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs
index df9d7a1..761584b 100644
--- a/miniz_oxide/src/deflate/core.rs
+++ b/miniz_oxide/src/deflate/core.rs
@@ -2192,7 +2192,13 @@ fn flush_output_buffer(c: &mut CallbackOxide, p: &mut ParamsOxide) -> (TDEFLStat
///
/// The value of `flush` ... | 5 | 18 | 13 |
a359d678c8d83565844ac5075e50c43d67d29879 | Lokathor | 2021-11-29T02:23:02 | Add decompress_slice_iter_to_slice function. (#112)
* Add decompress_slice_iter_to_slice function.
* avoid nightly methods in tests.
* missed one.
* zlib_header is immutable, DecompressorOxide will alreayd track the necessary state. | diff --git a/miniz_oxide/src/inflate/mod.rs b/miniz_oxide/src/inflate/mod.rs
index 5e8daf0..8a7916f 100644
--- a/miniz_oxide/src/inflate/mod.rs
+++ b/miniz_oxide/src/inflate/mod.rs
@@ -167,10 +167,64 @@ fn decompress_to_vec_inner(
}
}
+/// Decompress one or more source slices from an iterator into the output sl... | 1 | 83 | 2 |
5869904c7f789580ace18f7e9084acbcd54a95be | oyvindln | 2021-11-28T20:25:03 | fix(inflate): Don't return HasMoreOutput if we are waiting for more input to read adler32 | diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.rs
index 40e0076..8723760 100644
--- a/miniz_oxide/src/inflate/core.rs
+++ b/miniz_oxide/src/inflate/core.rs
@@ -1648,7 +1648,13 @@ pub fn decompress(
0
};
- if status == TINFLStatus::NeedsMoreInput && out_buf.bytes_left() ==... | 1 | 7 | 1 |
79c584947e78b34783e0ff315084d1f7aa219467 | oyvindln | 2021-11-11T16:28:59 | refactor(core): use u16 for hash value | diff --git a/miniz_oxide/src/deflate/buffer.rs b/miniz_oxide/src/deflate/buffer.rs
index a47d651..f246c07 100644
--- a/miniz_oxide/src/deflate/buffer.rs
+++ b/miniz_oxide/src/deflate/buffer.rs
@@ -17,8 +17,9 @@ pub const LZ_HASH_SHIFT: i32 = (LZ_HASH_BITS + 2) / 3;
/// Size of the chained hash tables.
pub const LZ_HA... | 2 | 4 | 3 |
94411d7b9d5f5ff8ad6e1efaca210124b8167519 | oyvindln | 2021-11-06T17:25:37 | refactor(miniz_oxide_c_api): update to rust 2018 edition | diff --git a/Cargo.toml b/Cargo.toml
index 0b3e06e..b97a2d7 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... | 7 | 30 | 27 |
bf30008ae0249f265b3f167e73eab99ddd033930 | oyvindln | 2021-11-06T17:04:01 | refactor(miniz_oxide_c_api): fix clippy warnings | diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs
index 354071b..3c78041 100644
--- a/miniz_oxide/src/deflate/core.rs
+++ b/miniz_oxide/src/deflate/core.rs
@@ -2441,7 +2441,10 @@ mod test {
assert_eq!(in_consumed, slice.len());
// Needs to be altered if algorithm improve... | 5 | 44 | 20 |
2e4c181082bdf1978666be8c6117eec61bbc2ec3 | oyvindln | 2021-11-06T16:28:15 | refactor(miniz_oxide): Fix clippy warning in compress_fast | diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs
index 73499c2..354071b 100644
--- a/miniz_oxide/src/deflate/core.rs
+++ b/miniz_oxide/src/deflate/core.rs
@@ -2032,7 +2032,7 @@ fn compress_fast(d: &mut CompressorOxide, callback: &mut CallbackOxide) -> bool
// Trigram w... | 1 | 30 | 5 |
dce8dbac45409b8a0d1651393a2dc80186eda683 | Matthew D. Fuller | 2021-11-05T16:58:58 | Attempt to add some documentation to external API's. (#108)
* Use the actual name of the argument.
* Linkify these TINFL_* refs.
* Linking to a submodule can just use the submodule name.
* Capitalize sentence, and remove untrue statement about adjusting out.
* Update out/out_pos references to describe what... | diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs
index 3962645..73499c2 100644
--- a/miniz_oxide/src/deflate/core.rs
+++ b/miniz_oxide/src/deflate/core.rs
@@ -209,15 +209,21 @@ pub enum CompressionStrategy {
/// A list of deflate flush types.
#[derive(Debug, Copy, Clone, PartialEq, Eq, H... | 6 | 181 | 51 |
559f0ed8467aa2af5dcde88ae53f853e71c52ce5 | oyvindln | 2021-11-04T20:23:39 | const a few more things | diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs
index 6b6f90a..3962645 100644
--- a/miniz_oxide/src/deflate/core.rs
+++ b/miniz_oxide/src/deflate/core.rs
@@ -415,13 +415,13 @@ impl CompressorOxide {
}
/// Get the adler32 checksum of the currently encoded data.
- pub fn adle... | 3 | 5 | 5 |
a9bf654f6a6756eed0812e612d19137f5c486444 | oyvindln | 2021-11-01T19:06:53 | fix(core): Don't use autofcg for alloc
Requires at least rust 1.36, though crate now depends on 1.40 or newer due to use of non_exhaustive
Closes #106 | diff --git a/miniz_oxide/Cargo.toml b/miniz_oxide/Cargo.toml
index 7993ddb..2975dda 100644
--- a/miniz_oxide/Cargo.toml
+++ b/miniz_oxide/Cargo.toml
@@ -12,14 +12,10 @@ documentation = "https://docs.rs/miniz_oxide"
description = "DEFLATE compression and decompression library rewritten in Rust based on miniz"
edition ... | 7 | 6 | 24 |
2e9408ae4cad10a00c604a008bd4f8c0704f0ac7 | oyvindln | 2021-11-01T17:56:41 | feat(inflate): add option to ignore and not compute zlib checksum when decompressing
Do this in a mostly backwards-compatible way, so it may be a bit clunky.
Closes #102 | diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.rs
index b18dbdd..1e9a046 100644
--- a/miniz_oxide/src/inflate/core.rs
+++ b/miniz_oxide/src/inflate/core.rs
@@ -109,8 +109,20 @@ pub mod inflate_flags {
pub const TINFL_FLAG_HAS_MORE_INPUT: u32 = 2;
/// The output buffer should not w... | 3 | 58 | 5 |
19782aa0833d201eed6bcbc847eefaa741bc2e32 | Marvin Countryman | 2021-04-25T12:14:40 | feature(simd): add simd-adler32 behind simd feature flag (#104)
thanks | diff --git a/Cargo.toml b/Cargo.toml
index 0680df0..f639222 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -38,6 +38,8 @@ build_stub_miniz = []
no_c_export = []
libc_stub = []
+simd = ['miniz_oxide/simd']
+
[profile.dev]
panic = "abort"
diff --git a/miniz_oxide/Cargo.toml b/miniz_oxide/Cargo.toml
index a2084dd..79... | 3 | 18 | 4 |
a7df1896a263676844926d22e72ca6843acd403b | oyvindln | 2021-02-25T14:51:15 | remove const that's not supported in 1.34 | diff --git a/miniz_oxide/src/inflate/output_buffer.rs b/miniz_oxide/src/inflate/output_buffer.rs
index 5218a80..89e6213 100644
--- a/miniz_oxide/src/inflate/output_buffer.rs
+++ b/miniz_oxide/src/inflate/output_buffer.rs
@@ -44,7 +44,7 @@ impl<'a> OutputBuffer<'a> {
}
#[inline]
- pub const fn bytes_left(... | 1 | 1 | 1 |
b4c67ba06fc526a012d078efc925494d788b88d0 | Igor Matuszewski | 2020-11-16T13:52:25 | Bump adler to a 1.0 version (#99) | diff --git a/miniz_oxide/Cargo.toml b/miniz_oxide/Cargo.toml
index ff38ffb..2ae2585 100644
--- a/miniz_oxide/Cargo.toml
+++ b/miniz_oxide/Cargo.toml
@@ -21,7 +21,7 @@ name = "miniz_oxide"
autocfg = "1.0"
[dependencies]
-adler = { version = "0.2.3", default-features = false }
+adler = { version = "1.0", default-feat... | 1 | 1 | 1 |
28514ec09f0b1ce74bfb2d561de52a6652ce377a | oyvindln | 2020-10-07T16:22:52 | feature(core): mark some internal functions const | diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs
index d25ea52..c02bcc9 100644
--- a/miniz_oxide/src/deflate/core.rs
+++ b/miniz_oxide/src/deflate/core.rs
@@ -385,7 +385,7 @@ fn write_u16_le(val: u16, slice: &mut [u8], pos: usize) {
// Read the two bytes starting at pos and interpret th... | 4 | 9 | 9 |
5a5522de50129513cb059e73020c8f1aad047200 | oyvindln | 2020-10-04T01:05:40 | fix(core): in-libstd build attempting to use std
Make sure core and not std is used when rustc-dep-of-std feature is enabled.
May or may not fix #97 | diff --git a/miniz_oxide/build.rs b/miniz_oxide/build.rs
old mode 100644
new mode 100755
diff --git a/miniz_oxide/src/inflate/mod.rs b/miniz_oxide/src/inflate/mod.rs
index 8edcbbe..e5b65c2 100644
--- a/miniz_oxide/src/inflate/mod.rs
+++ b/miniz_oxide/src/inflate/mod.rs
@@ -1,10 +1,10 @@
//! This module contains functi... | 3 | 6 | 5 |
80859093c1298ff5a97e149d9e3a882ce92fbde5 | Ralph Bisschops | 2020-09-26T18:14:40 | Add forbid unsafe code to build (#98)
This is because of a geiger issue
https://github.com/rust-secure-code/cargo-geiger/issues/82 | diff --git a/miniz_oxide/build.rs b/miniz_oxide/build.rs
index 937e4e5..e916ace 100644
--- a/miniz_oxide/build.rs
+++ b/miniz_oxide/build.rs
@@ -1,3 +1,4 @@
+#![forbid(unsafe_code)]
use autocfg;
fn main() { | 1 | 1 | 0 |
0c67dc5c15f4b6ffe23c184e7072bf9bf8d4a99a | Plecra | 2020-09-10T20:54:44 | Automatic alloc detection (#95)
* feat: automatic `alloc` detection
* fix: leave the feature in for compatibility | diff --git a/miniz_oxide/Cargo.toml b/miniz_oxide/Cargo.toml
index 8ffd341..39e4285 100644
--- a/miniz_oxide/Cargo.toml
+++ b/miniz_oxide/Cargo.toml
@@ -12,10 +12,14 @@ documentation = "https://docs.rs/miniz_oxide"
description = "DEFLATE compression and decompression library rewritten in Rust based on miniz"
edition ... | 3 | 13 | 4 |
743d6d37743b1277b984a583b1443ac32f2b576e | Douman | 2020-09-05T18:34:19 | Add missing pub to FullReset's data format (#96) | diff --git a/miniz_oxide/src/inflate/stream.rs b/miniz_oxide/src/inflate/stream.rs
index 8823218..148d132 100644
--- a/miniz_oxide/src/inflate/stream.rs
+++ b/miniz_oxide/src/inflate/stream.rs
@@ -44,7 +44,7 @@ impl ResetPolicy for ZeroReset {
/// Full reset of the state, including zeroing memory.
///
/// Requires t... | 1 | 1 | 1 |
d18e847dd4e1d09dd3e3a90ef5be0b29bd869843 | HeroicKatora | 2020-08-15T11:30:27 | Add an optional feature for 1.34.2 compatibility (#84) | diff --git a/miniz_oxide/Cargo.toml b/miniz_oxide/Cargo.toml
index 52b5f2d..ebf22bf 100644
--- a/miniz_oxide/Cargo.toml
+++ b/miniz_oxide/Cargo.toml
@@ -29,3 +29,5 @@ compiler_builtins = { version = '0.1.2', optional = true }
# Internal feature, only used when building as part of libstd, not part of the
# stable inte... | 5 | 12 | 7 |
1f95a16fdc6155ee5de438ab5c1ae9325063473d | Douman | 2020-08-15T11:30:18 | Introduce reset policy to control InflateState::reset (#91)
* Introduce reset policy to control InflateState::reset
* Update comments per request | diff --git a/miniz_oxide/src/inflate/stream.rs b/miniz_oxide/src/inflate/stream.rs
index 39c602f..fe2c688 100644
--- a/miniz_oxide/src/inflate/stream.rs
+++ b/miniz_oxide/src/inflate/stream.rs
@@ -8,6 +8,52 @@ use crate::inflate::core::{decompress, inflate_flags, DecompressorOxide, TINFL_L
use crate::inflate::TINFLSta... | 1 | 65 | 9 |
f8c25f3f08d2699f964df282946995483acf3f93 | Sergey "Shnatsel" Davidoff | 2020-08-05T13:35:21 | Add support for limiting output size when decompressing to Vec (#88)
* Add support for limiting output size when decompressing to Vec
* Document the new functions | diff --git a/miniz_oxide/src/inflate/mod.rs b/miniz_oxide/src/inflate/mod.rs
index 5757016..de49686 100644
--- a/miniz_oxide/src/inflate/mod.rs
+++ b/miniz_oxide/src/inflate/mod.rs
@@ -1,5 +1,6 @@
//! This module contains functionality for decompression.
+use ::core::cmp::min;
use ::core::usize;
use alloc::boxed::... | 1 | 65 | 10 |
ad0f8fef9c532720fb9603a0341ff7d176af2fc4 | Jonas Schievink | 2020-06-28T16:34:08 | Switch from adler32 to adler crate (#83) | diff --git a/miniz_oxide/Cargo.toml b/miniz_oxide/Cargo.toml
index 70733f7..25bc5af 100644
--- a/miniz_oxide/Cargo.toml
+++ b/miniz_oxide/Cargo.toml
@@ -17,7 +17,7 @@ exclude = ["benches/*", "tests/*"]
name = "miniz_oxide"
[dependencies]
-adler32 = { version = "1.1.0", default-features = false }
+adler = { version ... | 2 | 6 | 6 |
7f5aedd7cc553b624902210a7d136440c138dc80 | Alex Crichton | 2020-06-17T11:29:45 | Flag `miniz_oxide` as a `#![no_std]` library (#81)
* Flag `miniz_oxide` as a `#![no_std]` library
This commit conversion the `miniz_oxide` crate to a `#![no_std]`
library, and is as a result a breaking change for the library. Currently
the only dependency on the `std` crate is the `std::io::Cursor` type,
which i... | diff --git a/miniz_oxide/Cargo.toml b/miniz_oxide/Cargo.toml
index c3a3e65..70733f7 100644
--- a/miniz_oxide/Cargo.toml
+++ b/miniz_oxide/Cargo.toml
@@ -17,4 +17,15 @@ exclude = ["benches/*", "tests/*"]
name = "miniz_oxide"
[dependencies]
-adler32 = "1.0.4"
+adler32 = { version = "1.1.0", default-features = false }... | 10 | 136 | 123 |
f0b0e8fd5c8255ad05c38bd23bdc702597ce0f77 | oyvindln | 2020-04-23T15:30:06 | fix(deflate): overflow panic with very large input buffer
Attempt to fix overflow panic when calling compress with a >4GB large slice. (#74) | diff --git a/Cargo.toml b/Cargo.toml
index 34d53fd..050b7b5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -40,6 +40,7 @@ libc_stub = []
[profile.dev]
panic = "abort"
+opt-level = 3
[profile.release]
panic = "abort"
diff --git a/miniz_oxide/src/deflate/buffer.rs b/miniz_oxide/src/deflate/buffer.rs
index d236339..a... | 4 | 99 | 70 |
f3299c8ea1c02f18fd3a7cb0d3b72be15da5944a | oyvindln | 2020-04-11T14:51:35 | fix(deflate): compress_to_vec infinite loop
Fixed bug causing an infinite loop when compress_to_vec was called with empty or 1-length input.
Closes #75 | diff --git a/miniz_oxide/src/deflate/mod.rs b/miniz_oxide/src/deflate/mod.rs
index fb398e4..dbe930c 100644
--- a/miniz_oxide/src/deflate/mod.rs
+++ b/miniz_oxide/src/deflate/mod.rs
@@ -119,7 +119,7 @@ fn compress_to_vec_inner(input: &[u8], level: u8, window_bits: i32, strategy: i3
// The comp flags function sets t... | 2 | 14 | 1 |
5129758d77cd2ea041a13a112def7312ee049e2f | oyvindln | 2020-04-11T14:44:56 | Revert "fix(deflate): compress_to_vec infinite loop"
This reverts commit 857763607bf78ab5a074956020c2817e9befef95. | diff --git a/Cargo.toml b/Cargo.toml
index b71c440..34d53fd 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -43,7 +43,6 @@ panic = "abort"
[profile.release]
panic = "abort"
-#overflow-checks = true
[badges]
travis-ci = { repository = "Frommi/miniz_oxide" }
diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/... | 4 | 5 | 29 |
857763607bf78ab5a074956020c2817e9befef95 | oyvindln | 2020-04-11T14:35:40 | fix(deflate): compress_to_vec infinite loop
Fixed bug causing an infinite loop when compress_to_vec was called with empty or 1-length input.
Closes #75 | diff --git a/Cargo.toml b/Cargo.toml
index 34d53fd..b71c440 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -43,6 +43,7 @@ panic = "abort"
[profile.release]
panic = "abort"
+#overflow-checks = true
[badges]
travis-ci = { repository = "Frommi/miniz_oxide" }
diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/... | 4 | 29 | 5 |
383b5976c5a0a029d6ed523f4b047507636854ae | Ingvar Stepanyan | 2020-03-12T22:54:53 | Don't heap-allocate callbacks (#73) | diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs
index 88a0f4c..2478281 100644
--- a/miniz_oxide/src/deflate/core.rs
+++ b/miniz_oxide/src/deflate/core.rs
@@ -513,7 +513,7 @@ impl Default for CompressorOxide {
/// Callback function and user used in `compress_to_output`.
pub struct Call... | 1 | 3 | 3 |
3e421eff990947a4dcbea5dbecbc6951d021a581 | oyvindln | 2020-03-01T21:03:06 | Bump version
Fixes #72 | diff --git a/Cargo.toml b/Cargo.toml
index 603d103..34d53fd 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.4"
+version = "0.2.5"
build = "src/build.rs"
license = "MIT"
readme = "README.md" | 1 | 1 | 1 |
928362f23f6d1b05ee34a274578f8194232586ff | oyvindln | 2020-03-01T20:59:01 | Use c data types so they work on both 64 and 32-bit | diff --git a/src/c_export.rs b/src/c_export.rs
index cd66aa2..1addc6d 100644
--- a/src/c_export.rs
+++ b/src/c_export.rs
@@ -55,7 +55,7 @@ pub enum CAPICompressionStrategy {
MZ_FILTERED = 1,
MZ_HUFFMAN_ONLY = 2,
MZ_RLE = 3,
- MZ_FIXED = 4
+ MZ_FIXED = 4,
}
pub const MZ_CRC32_INIT: c_ulong = 0;
... | 3 | 22 | 10 |
29afe3e1dda442fb67dc103659f39d26a5984da7 | oyvindln | 2020-02-03T14:22:48 | Exclude test directory from package + update adler32 version | diff --git a/miniz_oxide/Cargo.toml b/miniz_oxide/Cargo.toml
index 89c59e6..3eeba5a 100644
--- a/miniz_oxide/Cargo.toml
+++ b/miniz_oxide/Cargo.toml
@@ -11,9 +11,10 @@ homepage = "https://github.com/Frommi/miniz_oxide/tree/master/miniz_oxide"
documentation = "https://docs.rs/miniz_oxide"
description = "DEFLATE compre... | 1 | 2 | 1 |
b10237779e320e267d4044f1ad5d64c9ccec6ee7 | Pyry Kontio | 2020-02-03T14:19:01 | Release 0.3.6 (#70) | diff --git a/miniz_oxide/Cargo.toml b/miniz_oxide/Cargo.toml
index e5be7f5..89c59e6 100644
--- a/miniz_oxide/Cargo.toml
+++ b/miniz_oxide/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "miniz_oxide"
authors = ["Frommi <daniil.liferenko@gmail.com>", "oyvindln <oyvindln@users.noreply.github.com>"]
-version = "0.3.5"
+ver... | 1 | 1 | 1 |
dece838f47ce5d55522e3bca302424bfa9623678 | oyvindln | 2020-01-31T21:46:42 | Set compression level in zlib header and run fmt
fixes #65 | diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs
index c00b505..88a0f4c 100644
--- a/miniz_oxide/src/deflate/core.rs
+++ b/miniz_oxide/src/deflate/core.rs
@@ -279,6 +279,98 @@ pub(crate) const MAX_MATCH_LEN: usize = 258;
const DEFAULT_FLAGS: u32 = NUM_PROBES[4] | TDEFL_WRITE_ZLIB_HEADER... | 3 | 121 | 10 |
1ef86b6cfb9b2d0d463c8ec054f399467810f076 | oyvindln | 2020-01-31T19:51:36 | Make sure HasMoreOutput will override NeedsMoreInput if both are true
fixes #69 | diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.rs
index e8f6b2a..160c970 100644
--- a/miniz_oxide/src/inflate/core.rs
+++ b/miniz_oxide/src/inflate/core.rs
@@ -1617,6 +1617,10 @@ fn decompress_inner(
0
};
+ if status == TINFLStatus::NeedsMoreInput && out_buf.bytes_left() ... | 1 | 4 | 1 |
75cf48b11a610efde1dee45ecb2176358a0b00ee | oyvindln | 2019-10-27T14:54:20 | Remove incorrect debug assertion
Fixes #63 | diff --git a/miniz_oxide/Cargo.toml b/miniz_oxide/Cargo.toml
index 69ff1aa..e5be7f5 100644
--- a/miniz_oxide/Cargo.toml
+++ b/miniz_oxide/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "miniz_oxide"
authors = ["Frommi <daniil.liferenko@gmail.com>", "oyvindln <oyvindln@users.noreply.github.com>"]
-version = "0.3.4"
+ver... | 2 | 2 | 5 |
0ea3474172dcb0713c292d5cc0bea1361f4d88f3 | oyvindln | 2019-10-26T23:45:30 | Bump version | diff --git a/miniz_oxide/Cargo.toml b/miniz_oxide/Cargo.toml
index 1f73adb..69ff1aa 100644
--- a/miniz_oxide/Cargo.toml
+++ b/miniz_oxide/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "miniz_oxide"
authors = ["Frommi <daniil.liferenko@gmail.com>", "oyvindln <oyvindln@users.noreply.github.com>"]
-version = "0.3.3"
+ver... | 1 | 1 | 1 |
45a6382ec4c828329961739f44f3bdde34e56069 | Pyry Kontio | 2019-10-22T18:11:00 | Fix typos (#62)
thanks | diff --git a/miniz_oxide/src/inflate/core.rs b/miniz_oxide/src/inflate/core.rs
index 4ca2d90..94d626e 100644
--- a/miniz_oxide/src/inflate/core.rs
+++ b/miniz_oxide/src/inflate/core.rs
@@ -988,9 +988,9 @@ fn decompress_fast(
(status, state)
}
-/// Main decompression function. Keeps decompressing data from `in_b... | 1 | 3 | 3 |
e2851fe1ef02222326c51532c15d5ca24deff33d | oyvindln | 2019-10-05T12:42:56 | Bump version (of the right crate this time) | diff --git a/miniz_oxide/Cargo.toml b/miniz_oxide/Cargo.toml
index abb9316..1f73adb 100644
--- a/miniz_oxide/Cargo.toml
+++ b/miniz_oxide/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "miniz_oxide"
authors = ["Frommi <daniil.liferenko@gmail.com>", "oyvindln <oyvindln@users.noreply.github.com>"]
-version = "0.3.2"
+ver... | 1 | 1 | 1 |
ef01ce180050b1da003903b5655af9507f1651e9 | oyvindln | 2019-10-01T15:45:28 | Bump version | diff --git a/Cargo.toml b/Cargo.toml
index 6a35a0f..603d103 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.3"
+version = "0.2.4"
build = "src/build.rs"
license = "MIT"
readme = "README.md" | 1 | 1 | 1 |
c54f10d08032bf017676957f05d84aa63dfbef39 | arbitrix | 2019-09-30T10:57:43 | Remove stray println. (#59)
Thanks! | diff --git a/miniz_oxide/src/inflate/stream.rs b/miniz_oxide/src/inflate/stream.rs
index e473cc3..42b8a74 100644
--- a/miniz_oxide/src/inflate/stream.rs
+++ b/miniz_oxide/src/inflate/stream.rs
@@ -169,7 +169,6 @@ pub fn inflate(
let ret_status = {
if (status as i32) < 0 {
- printl... | 1 | 0 | 1 |
b2bfb9776d289ee751a48df705b60eaa50625d1b | oyvindln | 2019-08-11T23:20:17 | Bump version and add reset function to inflatestate | diff --git a/miniz_oxide/Cargo.toml b/miniz_oxide/Cargo.toml
index 6374232..abb9316 100644
--- a/miniz_oxide/Cargo.toml
+++ b/miniz_oxide/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "miniz_oxide"
authors = ["Frommi <daniil.liferenko@gmail.com>", "oyvindln <oyvindln@users.noreply.github.com>"]
-version = "0.3.1"
+ver... | 3 | 21 | 1 |
23a6759fb473e2156b1e07279176810b6e664e59 | Sergey "Shnatsel" Davidoff | 2019-08-09T14:56:25 | Forbid unsafe code in the core crate (#56)
:+1: | diff --git a/miniz_oxide/src/lib.rs b/miniz_oxide/src/lib.rs
index 5d94c10..c2abb54 100644
--- a/miniz_oxide/src/lib.rs
+++ b/miniz_oxide/src/lib.rs
@@ -21,6 +21,8 @@
//!
//! ```
+#![forbid(unsafe_code)]
+
extern crate adler32;
pub mod deflate; | 1 | 2 | 0 |
1f555a5f4dd45b77e2b8f21aa33e1e6e378d837c | oyvindln | 2019-08-07T19:13:22 | Rename format to raw for raw stream
Don't use AsRef<[u8]> as that didn't work correctly. | diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs
index 8757bd0..e1263fc 100644
--- a/miniz_oxide/src/deflate/core.rs
+++ b/miniz_oxide/src/deflate/core.rs
@@ -347,7 +347,7 @@ impl CompressorOxide {
if (self.params.flags & TDEFL_WRITE_ZLIB_HEADER) != 0 {
DataFormat::Zl... | 4 | 26 | 16 |
ea2a985e95c27b95d37da18d931e3485d7fe2dd7 | oyvindln | 2019-08-07T16:03:00 | More documentation improvements.
Alter name of function in deflate to be more consistent. | diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs
index 0d75e87..8757bd0 100644
--- a/miniz_oxide/src/deflate/core.rs
+++ b/miniz_oxide/src/deflate/core.rs
@@ -167,7 +167,8 @@ pub mod deflate_flags {
/// Should we use greedy parsing (as opposed to lazy parsing where look ahead one or m... | 3 | 42 | 18 |
34367b9d8033a4d49d67efee71984dd819d47d01 | oyvindln | 2019-08-07T15:12:17 | add documentation and use enum for zlib setting
Remove some accidental dev println
remove executable bit on source file
add more stuff to excludes for c api | diff --git a/Cargo.toml b/Cargo.toml
index a2fe4d9..6a35a0f 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... | 8 | 145 | 51 |
d0635019a63bdb9dd7a1ea030fb57261dce07070 | oyvindln | 2019-08-05T14:05:38 | Avoid some unneeded reprs
rename state -> stream
Only export alloc funcs if c export enabled | diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs
index 4ded5e0..1ebca47 100644
--- a/miniz_oxide/src/deflate/core.rs
+++ b/miniz_oxide/src/deflate/core.rs
@@ -197,7 +197,6 @@ pub enum CompressionStrategy {
}
/// A list of deflate flush types.
-#[repr(u32)]
#[derive(Debug, Copy, Clone,... | 10 | 63 | 23 |
e2cc4135a05759ce7ba6e772871b57c9f60b6788 | oyvindln | 2019-08-04T20:09:24 | Clean up API for inflate/deflate, use reset in deflateReset | diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs
index 01811b2..4ded5e0 100644
--- a/miniz_oxide/src/deflate/core.rs
+++ b/miniz_oxide/src/deflate/core.rs
@@ -1255,7 +1255,7 @@ impl ParamsOxide {
flush_ofs: 0,
flush_remaining: 0,
finished: false,
- ... | 7 | 233 | 115 |
f8f4dfc29fc1437bf820ef511cb419750fffc673 | oyvindln | 2019-08-03T14:02:34 | more work on moving needed stream stuff to core and some cleanup | diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs
index 3247309..01811b2 100644
--- a/miniz_oxide/src/deflate/core.rs
+++ b/miniz_oxide/src/deflate/core.rs
@@ -7,7 +7,8 @@ use std::io::{self, Cursor, Seek, SeekFrom, Write};
use super::CompressionLevel;
use super::deflate_flags::*;
use su... | 5 | 75 | 72 |
9720ec46ab73f863a96c2c3d735dad318ffee79f | Felix Hanau | 2019-08-03T13:59:31 | Avoid unnecessary copying by resizing instead of extending vectors (#55) | diff --git a/miniz_oxide/src/deflate/mod.rs b/miniz_oxide/src/deflate/mod.rs
index 7cee4c0..c03197b 100644
--- a/miniz_oxide/src/deflate/mod.rs
+++ b/miniz_oxide/src/deflate/mod.rs
@@ -141,10 +141,9 @@ fn compress_to_vec_inner(input: &[u8], level: u8, window_bits: i32, strategy: i3
break;
... | 2 | 4 | 5 |
0563540217bfa8c7bb6daa8926591effb8c28e91 | oyvindln | 2019-08-01T20:29:13 | Move inner deflate function as well | diff --git a/miniz_oxide/src/deflate/state.rs b/miniz_oxide/src/deflate/state.rs
new file mode 100644
index 0000000..53b4f40
--- /dev/null
+++ b/miniz_oxide/src/deflate/state.rs
@@ -0,0 +1,63 @@
+use std::mem;
+use crate::{MZResult, MZFlush, MZError, MZStatus};
+use crate::deflate::core::{TDEFLStatus, TDEFLFlush, Compr... | 1 | 63 | 0 |
2973b7c3512584af9ef5c2ee4f5a486dbd515fc5 | oyvindln | 2019-08-01T18:38:35 | Start separating stream glue bits from C api. | diff --git a/miniz_oxide/src/deflate/buffer.rs b/miniz_oxide/src/deflate/buffer.rs
index 57f41b5..4a0b37c 100644
--- a/miniz_oxide/src/deflate/buffer.rs
+++ b/miniz_oxide/src/deflate/buffer.rs
@@ -16,6 +16,13 @@ pub struct HashBuffers {
pub hash: [u16; LZ_DICT_SIZE],
}
+impl HashBuffers {
+ #[inline]
+ pu... | 8 | 332 | 199 |
6c7958a36d6136079f653983a1fb573b641007a6 | oyvindln | 2019-07-27T15:30:12 | Fix exports that broke flate2 compile on latest git | diff --git a/src/c_export.rs b/src/c_export.rs
index 1551d77..cdbf04e 100644
--- a/src/c_export.rs
+++ b/src/c_export.rs
@@ -32,6 +32,8 @@ pub mod return_status {
pub const MZ_NEED_DICT: c_int = MZStatus::NeedDict as c_int;
}
+pub use return_status::*;
+
/// Deflate flush modes.
pub mod flush_modes {
use... | 2 | 18 | 0 |
918aa73285e3ccf57ad3034730f51dddf49a1c48 | oyvindln | 2019-07-25T15:12:34 | Start reorganizing c api | diff --git a/src/c_export.rs b/src/c_export.rs
new file mode 100644
index 0000000..1551d77
--- /dev/null
+++ b/src/c_export.rs
@@ -0,0 +1,262 @@
+/// Module that contains most of the functions exported to C.
+use std::{slice, ptr};
+use std::marker::PhantomData;
+
+pub use tinfl::{tinfl_decompress, tinfl_decompress_mem... | 5 | 377 | 381 |
40d75ea2aac3d5b1c8621f6be480095e19998e63 | oyvindln | 2019-07-23T16:30:27 | Avoid raw alloc in stream struct
fix mz_stream struct to be consistent with miniz.h header | diff --git a/src/lib_oxide.rs b/src/lib_oxide.rs
index 065ea8f..accf7cd 100644
--- a/src/lib_oxide.rs
+++ b/src/lib_oxide.rs
@@ -2,11 +2,12 @@
use std::{cmp, mem, ptr, slice, usize};
use std::io::Cursor;
-use std::alloc::{alloc_zeroed, dealloc, Layout};
+use std::default::Default;
+use std::marker::PhantomData;
... | 2 | 94 | 102 |
a34e8cba918583f247701267a4feb7e03f050c42 | oyvindln | 2019-07-22T16:47:15 | bum version in c api | diff --git a/Cargo.toml b/Cargo.toml
index 5b5b6d2..f92dbca 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.2"
+version = "0.2.3"
build = "src/build.rs"
license = "MIT"
readme = "README.md"
@@ -23,7 +23... | 1 | 2 | 2 |
59ba18a6af4fb378135fc04d5cccba95efded9a2 | oyvindln | 2019-07-22T15:36:33 | Bump edition and version | diff --git a/miniz_oxide/Cargo.toml b/miniz_oxide/Cargo.toml
index 7cda318..ae58f1b 100644
--- a/miniz_oxide/Cargo.toml
+++ b/miniz_oxide/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "miniz_oxide"
authors = ["Frommi <daniil.liferenko@gmail.com>"]
-version = "0.2.3"
+version = "0.3.0"
license = "MIT"
readme = "Readm... | 1 | 2 | 1 |
7bcf211cbd5e405d0eac3f51d6604c3c0c74eb66 | oyvindln | 2019-07-22T15:31:14 | Remove last unsafe usage in core crate | diff --git a/miniz_oxide/src/deflate/core.rs b/miniz_oxide/src/deflate/core.rs
index 5b602d8..991056a 100644
--- a/miniz_oxide/src/deflate/core.rs
+++ b/miniz_oxide/src/deflate/core.rs
@@ -1,6 +1,7 @@
//! Streaming compression functionality.
-use std::{cmp, mem, ptr};
+use std::{cmp, mem};
+use std::convert::TryInto... | 3 | 23 | 58 |
0a5a4b9df2b427d3e92d9fc6604460b8857c34f3 | oyvindln | 2019-07-21T23:20:18 | Bump version | diff --git a/miniz_oxide/Cargo.toml b/miniz_oxide/Cargo.toml
index c18928d..7cda318 100644
--- a/miniz_oxide/Cargo.toml
+++ b/miniz_oxide/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "miniz_oxide"
authors = ["Frommi <daniil.liferenko@gmail.com>"]
-version = "0.2.2"
+version = "0.2.3"
license = "MIT"
readme = "Readm... | 1 | 1 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.