fromValue static method
Resolves a native wire value back to an enum entry.
Unknown values fall back to CPDFCompressAlgorithm.none so that a newer native SDK cannot crash an older Dart layer.
Implementation
static CPDFCompressAlgorithm fromValue(String? value) {
for (final algorithm in CPDFCompressAlgorithm.values) {
if (algorithm.value == value) {
return algorithm;
}
}
return CPDFCompressAlgorithm.none;
}