| 183 | } |
| 184 | |
| 185 | std::string unzipper::dump() |
| 186 | { |
| 187 | if (isOpenEntry()) |
| 188 | { |
| 189 | unsigned int size = getEntrySize(); |
| 190 | char* buf = new char[size]; |
| 191 | size = unzReadCurrentFile(zipFile_, buf, size); |
| 192 | std::string ret = ""; |
| 193 | if (size > 0) |
| 194 | ret = std::string(buf, size); |
| 195 | delete[] buf; |
| 196 | return ret; |
| 197 | } |
| 198 | throw std::runtime_error("Entry is not opened"); |
| 199 | } |
| 200 | }; |
no test coverage detected