szip: update CompressionLevel fields to use their named C values (#19957)

This commit is contained in:
Turiiya 2023-11-21 13:15:57 +01:00 committed by GitHub
parent db1cdba411
commit 16b07a191a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,14 +55,13 @@ fn cb_zip_extract(filename &&char, arg &&char) int {
return 0 return 0
} }
// CompressionLevel lists compression levels, see in "thirdparty/zip/miniz.h"
pub enum CompressionLevel { pub enum CompressionLevel {
no_compression = 0 no_compression = C.MZ_NO_COMPRESSION
best_speed = 1 best_speed = C.MZ_BEST_SPEED
best_compression = 9 best_compression = C.MZ_BEST_COMPRESSION
uber_compression = 10 uber_compression = C.MZ_UBER_COMPRESSION
default_level = 6 default_level = C.MZ_DEFAULT_LEVEL
default_compression = -1 default_compression = C.MZ_DEFAULT_COMPRESSION
} }
// OpenMode lists the opening modes // OpenMode lists the opening modes