| 149 | } |
| 150 | |
| 151 | int 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 | |
| 170 | ZIPReader::ZIPReader() {} |
| 171 |
no test coverage detected