| 138 | } |
| 139 | |
| 140 | bool WriteToFile(std::string const & fileName, std::string const & data) |
| 141 | { |
| 142 | std::ofstream ofs(fileName); |
| 143 | if (!ofs.is_open()) |
| 144 | { |
| 145 | LOG(LERROR, ("Failed to write into a temporary file.")); |
| 146 | return false; |
| 147 | } |
| 148 | |
| 149 | ofs << data; |
| 150 | return true; |
| 151 | } |
| 152 | |
| 153 | std::string Decompress(std::string const & compressed, std::string const & encoding) |
| 154 | { |