MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / get_compression_level

Method get_compression_level

modules/zip/zip_reader.cpp:151–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151int ZIPReader::get_compression_level(const String &p_path, bool p_case_sensitive) {
152 ERR_FAIL_COND_V_MSG(fa.is_null(), -1, "ZIPReader must be opened before use.");
153
154 int cs = p_case_sensitive ? 1 : 2;
155 if (unzLocateFile(uzf, p_path.utf8().get_data(), cs) != UNZ_OK) {
156 return -1;
157 }
158
159 int method;
160 int level;
161 if (unzOpenCurrentFile2(uzf, &method, &level, 1) != UNZ_OK) {
162 return -1;
163 }
164
165 unzCloseCurrentFile(uzf);
166
167 return level;
168}
169
170ZIPReader::ZIPReader() {}
171

Callers 1

test_zip.hFile · 0.45

Calls 3

is_nullMethod · 0.45
get_dataMethod · 0.45
utf8Method · 0.45

Tested by

no test coverage detected