1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
//! Core types for PNG encoding configuration.
//!
//! These are zenpng's own types, independent of the `png` crate backend.
/// PNG compression effort.
///
/// Controls the trade-off between encoding speed and output file size.
/// Higher effort produces smaller files but takes longer.
///
/// Named presets are placed at Pareto-optimal points on the effort curve,
/// approximately log-spaced in encode time (each step ~2x slower).
/// Use [`Effort`](Self::Effort) for fine-grained control between presets.
///
/// | Preset | Effort | Description |
/// |---------|--------|-------------|
/// | `None` | 0 | Uncompressed |
/// | `Fastest` | 1 | 1 strategy (Paeth), turbo DEFLATE |
/// | `Turbo` | 2 | 3 strategies, turbo DEFLATE |
/// | `Fast` | 7 | 5 strategies, FastHt screen-only |
/// | `Balanced` | 13 | 9 strategies, screen + lazy refine |
/// | `Thorough` | 17 | 9 strategies, lazy2 multi-tier + brute-force |
/// | `High` | 19 | Near-optimal multi-tier + brute-force |
/// | `Aggressive` | 22 | Near-optimal + extended brute-force |
/// | `Intense` | 24 | Full brute-force + near-optimal |
/// | `Crush` | 27 | Full brute-force + beam search + zenzop |
/// | `Maniac` | 30 | Maximum standard pipeline |
/// | `Brag` | 31 | Full pipeline + 15 FullOptimal iterations (beats ECT-9) |
/// | `Minutes` | 200 | Full pipeline + 184 FullOptimal iterations |
/// PNG row filter strategy.
///
/// Currently only automatic multi-strategy selection is supported. The encoder
/// tries 8 strategies (5 single-filter + 3 adaptive heuristics) and keeps the
/// smallest result.