This change allows users pass compression level that was not listed
in the enum. Also, I think using different values than zlib's
compression levels was just confusing.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Looks like this change removes/reduces some type safety - by moving to an
int parameter.
Could the enum be kept, but with all the values supported? (an enum's
representable values includes at least (actually more than - round up to
the nearest number of bits required) all the values smaller than the
largest enumerator - so an enum with the BestSize value will be usable for
all the others (eg: even with an enum class which doesn't allow implicit
conversions, a user could write (CompressionLevel)3 to get that specific
level).