Rémi Lauzier
286aaffa31
small fix
2021-06-24 19:47:21 -04:00
Rémi Lauzier
91a18ebe97
Fix some clippy warnings
2021-06-24 15:57:41 -04:00
Kornel
3e996a0f82
Make sure passes clear last line
2021-06-16 19:39:05 -04:00
Kornel
b6cc8e2414
Optimize unfiltering ( #400 )
...
* Clippy lints
* Fewer pushes
* Remove special case for empty last line
* Zip with last line
* Combine bound checks
2021-05-19 15:16:14 -04:00
Kornel
14867c7abc
Clippy lints ( #401 )
2021-05-19 10:04:31 -04:00
Kornel
04010978a0
Use optimized copy
2021-01-20 14:33:27 -05:00
Kornel
53ddd721a7
Reject truncated image data instead of panicking
2021-01-20 14:33:27 -05:00
Josh Holmer
b446a8a92e
Optimize reading in files
2020-10-22 09:51:25 -04:00
Ingvar Stepanyan
878bbedb37
Improve performance consistency ( #202 )
...
* Improve performance consistency
Switch from HashMap / HashSet to IndexMap / IndexSet for consistent iteration order of various options and, as a result, more predictable performance.
2020-03-31 21:54:05 -04:00
Josh Holmer
0e3c0b922d
Enable more clippy lints and fix some clippy issues
2020-01-19 05:22:14 -05:00
Josh Holmer
139d29cc9b
Version 2.3.0
2019-10-07 23:34:23 -04:00
Kamal Ahmad
68b763bcdd
Reduce alloc in filtering/unfiltering by reusing buffers ( #191 )
2019-09-04 11:09:54 -04:00
Felix Hanau
56b94542a6
Fix decoding interlaced images with height or width <= 2 ( #175 )
2019-06-27 13:44:34 -04:00
Josh Holmer
5b1121c9dd
Make order of chunks deterministic by sorting chunks
...
Closes #174
2019-06-18 13:29:17 -04:00
Josh Holmer
d86bc80f43
Prepare for next release
2019-02-01 17:27:03 -05:00
Kornel
9af874d21b
Make reductions return a new uncompressed image ( #158 )
...
* Fix verbose message
* No cloning when restoring original data
* Make reductions return a new uncompressed image
Partially fixes #145
* Async reduction evaluator
* Assert
* Faster bit depth check
* Also try 4-bit depth for small-depth images
* Skip test when using miniz
* Ensure palette is trimmed after depth reduction
Fixes #159
* Fudge factor for reductions to prefer better reductions even if gzip estimation says otherwise
2019-01-27 03:22:49 -05:00
Kornel
55d85df9fc
Non-self-mutable reductions ( #154 )
...
* Move reductions to a module. Make copy instead of changing in-place.
* Alpha reductions
* Immutable color reductions
* Immutable interlace reductions
2019-01-12 05:07:57 -05:00
Joshua Holmer
1305b5cf17
Fix clippy lints and run rustfmt
2018-11-26 13:41:14 -05:00
Kornel
602cd6991e
80× faster palette reduction ( #150 )
...
* Faster palette reduction
* Simplified iterator
* Mutable scanline iterator
2018-11-25 01:31:43 -05:00
Kornel
686adcdebd
Optimize RGB/A to palette conversion ( #148 )
2018-11-22 21:52:02 -05:00
Kornel
588d5bd52b
Tweaks and Microoptimizations ( #146 )
...
* Fixed alpha benchmark
* Dedupe function
* Use integer math when rounding
* Fewer temporaries when slicing palette
* Filtering microoptimizations
2018-11-20 08:39:46 -05:00
Kornel
4765eaa7f3
Alpha heuristic improvements ( #144 )
...
* Compress alpha with strategy sensitive to repetitions
* Update reductions flag when alpha changed
* Avoid needlessly cloning out-of-date idat_data and temp raw_data
2018-11-14 08:30:15 -05:00
Kornel
3c466df80e
Chunk name as 4 bytes ( #135 )
2018-09-16 16:09:55 -04:00
Josh Holmer
7895e42687
Version 2.1.1
2018-08-11 20:34:04 -04:00
Josh Holmer
71d0f6fa31
Fix more issues with alpha optim on interlaced images
...
Closes #133
2018-08-11 20:27:45 -04:00
Josh Holmer
f862a0df24
Apply clippy fixes
2018-07-28 16:51:54 -04:00
Matthias Krüger
868fd502b9
reduce_alpha_to_up(): simplify code, don't convert Vec -> iter -> Vec in order to reverse elts, just vec.reverse(). ( #127 )
2018-07-28 11:19:56 -04:00
Josh Holmer
7303b94afc
Fix issue with alpha optim on interlaced images
...
Closes #113
2018-07-27 23:03:36 -04:00
Josh Holmer
d110949d2a
Version 2.0.0
2018-07-20 19:19:20 -04:00
Kornel
76a2e51c15
Reduce allocations ( #122 )
...
* Iterate with fewer temp allocations
* Avoid allocation when not reducing
* Avoid slow modulo
2018-07-20 18:40:51 -04:00
Kornel
efde5747c4
Parse without temporary allocation ( #119 )
2018-07-15 09:11:26 -04:00
Kornel
d2b1d56e8b
Improved limiting of max gzip size ( #116 )
2018-07-10 22:36:43 -04:00
myfreeweb
ae65e4be8d
Make Rayon an optional dependency ( #112 )
...
On WebAssembly, Rayon does not work (thread pool fails to initialize since threads are stubbed out).
2018-07-06 10:50:36 -04:00
Kornel
442eaf766c
Bail early ( #104 )
2018-06-08 00:09:22 -04:00
Kornel
e472c82876
Option to use Cloudflare's zlib for compression ( #103 )
...
Behind the nightly feature flag for now--stable ASM is coming in Rust 1.27
2018-06-04 15:39:51 -04:00
Josh Holmer
d7369707ba
Fix a change that breaks itertools with newer versions of Rust nightly
2018-03-04 23:47:06 -05:00
Josh Holmer
fe9cd01b82
Replace miniz_sys with miniz_oxide, a Rust implementation of miniz
...
This also improves decompression performance by 15%, and obsoletes the
`--zm` parameter.
Closes #57
2018-01-30 23:52:37 -05:00
Josh Holmer
0c2e3777b1
Refactor an if statement
2018-01-30 22:27:34 -05:00
Josh Holmer
348c7dbc56
Extract a function into a submodule
2018-01-30 22:21:31 -05:00
Josh Holmer
3497040b78
Remove useless annotation
2018-01-30 22:18:22 -05:00
Josh Holmer
cf5b90b444
Preallocate vector on reading in file
...
Provides 1.5% overall speedup on -o4
2018-01-30 22:15:03 -05:00
Josh Holmer
ece85e6d15
Refactoring of internal code into smaller chunks.
...
There is still more to be done.
2018-01-30 09:35:03 -05:00