Commit graph

466 commits

Author SHA1 Message Date
dependabot-preview[bot]
d70fd3bfcc Bump miniz_oxide from 0.3.6 to 0.3.7
Bumps [miniz_oxide](https://github.com/Frommi/miniz_oxide) from 0.3.6 to 0.3.7.
- [Release notes](https://github.com/Frommi/miniz_oxide/releases)
- [Changelog](https://github.com/Frommi/miniz_oxide/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Frommi/miniz_oxide/compare/0.3.6...0.3.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-11 07:44:30 -04:00
dependabot-preview[bot]
528f17eb6a Bump libdeflater from 0.3.0 to 0.5.0
Bumps [libdeflater](https://github.com/adamkewley/libdeflater) from 0.3.0 to 0.5.0.
- [Release notes](https://github.com/adamkewley/libdeflater/releases)
- [Commits](https://github.com/adamkewley/libdeflater/compare/0.3.0...0.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-10 10:43:22 -04:00
dependabot-preview[bot]
c444e29cbb Bump libdeflater from 0.2.0 to 0.3.0
Bumps [libdeflater](https://github.com/adamkewley/libdeflater) from 0.2.0 to 0.3.0.
- [Release notes](https://github.com/adamkewley/libdeflater/releases)
- [Commits](https://github.com/adamkewley/libdeflater/compare/0.2.0...0.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-09 14:49:00 -04:00
dependabot-preview[bot]
4ad586e427 Bump wild from 2.0.3 to 2.0.4
Bumps [wild](https://gitlab.com/kornelski/wild) from 2.0.3 to 2.0.4.
- [Release notes](https://gitlab.com/kornelski/wild/tags)
- [Commits](https://gitlab.com/kornelski/wild/commits/master)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-05 10:48:51 +00:00
dependabot-preview[bot]
403c80d7ca Bump rgb from 0.8.17 to 0.8.18
Bumps [rgb](https://github.com/kornelski/rust-rgb) from 0.8.17 to 0.8.18.
- [Release notes](https://github.com/kornelski/rust-rgb/releases)
- [Commits](https://github.com/kornelski/rust-rgb/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-04 09:46:08 -04:00
dependabot-preview[bot]
50de0a6fa4 Bump indexmap from 1.3.2 to 1.4.0
Bumps [indexmap](https://github.com/bluss/indexmap) from 1.3.2 to 1.4.0.
- [Release notes](https://github.com/bluss/indexmap/releases)
- [Commits](https://github.com/bluss/indexmap/compare/1.3.2...1.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-02 14:29:48 +00:00
lunaryorn
f5d8aa0249
Build more release binaries (#233)
* Build more release binaries

Include a static Linux binary with musl and a macOS build.  Also add
readme, license and changelog to the release archives.

Fixes GH-134

* Merge windows and linux builds

* Test musl and darwin targets

* Fix matrix exclude key
2020-06-02 09:35:49 -04:00
Josh Holmer
974dfcfeac More readme updates 2020-05-24 20:05:04 -04:00
Josh Holmer
65e4d57e88 Remove statement from Readme which is no longer true 2020-05-24 20:02:10 -04:00
Josh Holmer
9a3a402be0 Display more useful error if Rust version too old
Closes #232
2020-05-24 20:00:01 -04:00
dependabot-preview[bot]
3038fd8c7d Bump wild from 2.0.2 to 2.0.3
Bumps [wild](https://gitlab.com/kornelski/wild) from 2.0.2 to 2.0.3.
- [Release notes](https://gitlab.com/kornelski/wild/tags)
- [Commits](https://gitlab.com/kornelski/wild/commits/master)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-18 15:09:45 +00:00
Luni-4
e4d4c93d9c
Add release description (#230)
* Add description to a release

* Fix typo
2020-05-15 15:07:03 -04:00
Luni-4
0a51fb06ea
Update deploy script (#229) 2020-05-14 22:14:16 -04:00
dependabot-preview[bot]
9849adcbd1 Bump clap from 2.33.0 to 2.33.1
Bumps [clap](https://github.com/clap-rs/clap) from 2.33.0 to 2.33.1.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/v2.33.1/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v2.33.0...v2.33.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-12 12:51:14 +00:00
Josh Holmer
48b3c3ba61 Fix deploy prefix
Some checks failed
deploy / create-binaries-windows (i686-pc-windows-msvc, i686-pc-windows-msvc) (push) Has been cancelled
deploy / create-binaries-windows (x86_64-pc-windows-msvc, x86_64-pc-windows-msvc) (push) Has been cancelled
deploy / deploy (push) Has been cancelled
2020-05-11 12:35:23 -04:00
Josh Holmer
971fd5aaed Try correcting artifact path 2020-05-11 11:41:56 -04:00
Josh Holmer
ef33e11a62 More release deploy fixes 2020-05-11 10:11:38 -04:00
Josh Holmer
ba36c4b046 Fix the last CI change 2020-05-11 09:38:11 -04:00
Josh Holmer
f9bb89481b Attempt i686 cross compilation on Github Actions release 2020-05-11 09:26:40 -04:00
Josh Holmer
50d5ec48cf Fix getting tag name on Windows deploy 2020-05-11 09:14:12 -04:00
Josh Holmer
820667c608 Remove unnecessary steps from deploy 2020-05-11 09:05:00 -04:00
Josh Holmer
9d156723c0
Use msvc toolchain for creating release binaries
The GNU toolchain seems to fail on compiling cloudflare-zlib-sys
2020-05-11 08:41:51 -04:00
dependabot-preview[bot]
2f791fe909
Bump bit-vec from 0.6.1 to 0.6.2 (#227)
Bumps [bit-vec](https://github.com/contain-rs/bit-vec) from 0.6.1 to 0.6.2.
- [Release notes](https://github.com/contain-rs/bit-vec/releases)
- [Commits](https://github.com/contain-rs/bit-vec/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-07 11:16:02 -04:00
Josh Holmer
fa11401eb1 Version 3.0.0 2020-05-06 10:11:47 -04:00
Ingvar Stepanyan
b06e077f8d
Add "max" level alias; various level-related warnings (#224)
* Update --help to exclude -a

* Add a deprecation warning to level 4 constructor

* Initialise logger earlier

* Add warning for level > 3 for non-zlib

It's not obvious immediately that these levels don't have any effect on libdeflater and Zopfli, since they don't iterate over zlib-specific fine-tuned options.

Hence, show warning so that user knows they're getting "downgraded" to level 3.

* Add "max" level alias; more level warnings

* Update --help trial numbers for non-zlib

* Fix incorrect trial numbers
2020-04-22 13:34:59 -04:00
Ingvar Stepanyan
fee76ca44f
Remove doc-hidden recursive option (#225)
As the comment mentions, this is used only in CLI interface, so there's no reason for it not to live directly in CLI code.

Ref: #220.
2020-04-20 08:51:18 -04:00
dependabot-preview[bot]
b2725d5149 Bump image from 0.23.3 to 0.23.4
Bumps [image](https://github.com/image-rs/image) from 0.23.3 to 0.23.4.
- [Release notes](https://github.com/image-rs/image/releases)
- [Changelog](https://github.com/image-rs/image/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image/compare/v0.23.3...v0.23.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-20 12:22:42 +00:00
dependabot-preview[bot]
ec8ecf5a80 Bump rgb from 0.8.16 to 0.8.17
Bumps [rgb](https://github.com/kornelski/rust-rgb) from 0.8.16 to 0.8.17.
- [Release notes](https://github.com/kornelski/rust-rgb/releases)
- [Commits](https://github.com/kornelski/rust-rgb/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-20 11:16:34 +00:00
Josh Holmer
0a4bde1ade Add docs.rs badge to readme 2020-04-18 19:17:00 -04:00
Josh Holmer
b55eced0ed Update build status badge in readme 2020-04-18 19:06:41 -04:00
Ingvar Stepanyan
23ae9c302f
Switch to standard logging library (#218)
This allows to configure or compile away logging in the library from a single place in Rust apps.

For the CLI side, the usage and output remained the same, except it's now colour-coded.

Fixes #217.
2020-04-18 18:33:48 -04:00
Ingvar Stepanyan
3b754bfa09
Use clap conflict argument checks (#219)
Follow-up to #210.

I haven't noticed / forgotten that clap has own mechanism for conflicts between arguments, and it's probably best to use it instead of custom checks.
2020-04-18 12:20:28 -04:00
Ingvar Stepanyan
a497513d89
Move Zlib-specific options under Zlib compressor (#210)
Make it statically obvious that they're not compatible with other compressors.
2020-04-17 10:05:13 -04:00
Josh Holmer
380c21ea97 Use checkout v2 2020-04-17 07:13:35 -04:00
Ingvar Stepanyan
e8ff6f7526
Remove unused (outdated?) options (#212)
Co-authored-by: Josh Holmer <jholmer.in@gmail.com>
2020-04-17 05:16:18 -04:00
Ingvar Stepanyan
bb332fa6d7
Don't override global rayon pool (#211)
Rayon uses a singleton global pool.

By default it's set to a regular spawn handler with number of logical CPU cores, but it can be overridden by Rust applications to customize number of threads, spawn handlers, exit handlers and other options.

Such customization should be usually done at the app level, because if a single library initialises the global pool, then Rayon will prevent any further overrides and they will error out. This can cause conflicts between libraries or library and user code and make them impossible to use together.

Hence, I've removed the `threads` option from the `Options` struct and instead moved initialisation to the CLI part of the codebase (main.rs).

Users of the library that didn't depend on custom `threads` number can keep using it as before - they'll still get same number of threads as number of logical CPU cores, while users who need fine-tuning, can do that by customizing rayon pool themselves at the top level of the app.

Note: another alternative to keep the option could've been to use `ThreadPoolBuilder::build` + `ThreadPool::install` to use a local pool just within OxiPNG, but that would ignore any customizations made by users in top-level pool and would prevent usage on targets that require custom spawn handlers like WebAssembly. As such, I've decided to avoid it.

Co-authored-by: Josh Holmer <jholmer.in@gmail.com>
2020-04-17 04:49:40 -04:00
Ingvar Stepanyan
4fd9203800 Bring back RefCell
It was accidentally removed as part of #208.
Fixes #214.
2020-04-16 18:31:24 -04:00
Ingvar Stepanyan
9b8361171f Revert "Unbreak no-default-features"
This reverts commit 4ef92089d5.
2020-04-16 18:31:24 -04:00
dependabot-preview[bot]
11a7b68c4f Bump num_cpus from 1.12.0 to 1.13.0
Bumps [num_cpus](https://github.com/seanmonstar/num_cpus) from 1.12.0 to 1.13.0.
- [Release notes](https://github.com/seanmonstar/num_cpus/releases)
- [Changelog](https://github.com/seanmonstar/num_cpus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/num_cpus/compare/v1.12.0...v1.13.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-16 10:54:52 +00:00
dependabot-preview[bot]
9098de22c1 Bump image from 0.23.2 to 0.23.3
Bumps [image](https://github.com/image-rs/image) from 0.23.2 to 0.23.3.
- [Release notes](https://github.com/image-rs/image/releases)
- [Changelog](https://github.com/image-rs/image/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image/compare/v0.23.2...v0.23.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-16 09:55:56 +00:00
Josh Holmer
139b2878d0 Fix benchmark compilation
Closes #197
2020-04-15 13:26:28 -04:00
Josh Holmer
53368fcbbf Reexport indexmap structs 2020-04-15 13:26:28 -04:00
Josh Holmer
4ef92089d5 Unbreak no-default-features
In order to avoid problems with mutable references,
the approach is to use the eval sender for non-parallel.
Computations will still be done synchronously
with the fake synchronous rayon module.
2020-04-15 13:26:28 -04:00
Josh Holmer
43735086d1 Migrate to Github Actions
Closes #206
2020-04-15 13:26:28 -04:00
Ingvar Stepanyan
63e36ed43f
Simplify comparer (#208)
* Skip baselines earlier in the evaluator

We know that we'll throw them away anyway, so there is no point in even sending them to Sender and comparing them with others once we used them for the best candidate size.

* Simplify comparison logic
2020-04-14 17:09:52 -04:00
Ingvar Stepanyan
f747269151
Respect deadline in miniz (#200) 2020-03-31 23:31:17 -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
4b1a47e902 Bump minimum rust version to 1.41 2020-03-31 20:57:50 -04:00
Ingvar Stepanyan
121558bf5c
Add libdeflater as an option (#203)
libdeflater is a Rust wrapper around
[libdeflate](https://github.com/ebiggers/libdeflate) - an alternative
heavily optimised library for deflate/zlib/gzip compression and
decompression that is intended for situations where upper bounds of the
output are well-known.

In my benchmarks on test files in the repo it has shown to be usually
both slightly faster and providing better compressed output than
cloudflare-zlib, but in some cases showing the opposite, so rather
than swapping defaults, it's currently provided as another option,
similarly to zopfli.

Since it's not strictly better in all cases, I'm not providing median
numbers, but you can check distribution histograms for time and size
differences here (all using `oxipng -o 6 -t 6 -P`):
https://docs.google.com/spreadsheets/d/1WOKgeYZBhLkQvMGAC36snN4azilElzOFhx63RJu0EZY/edit?usp=sharing
2020-03-31 20:24:57 -04:00
Kornel
681089f8c7
Remove the concept of size bias (#199)
Closes #198
2020-03-31 19:28:22 -04:00