| 1963 | |
| 1964 | |
| 1965 | String JavascriptProcessor::getBase64CompressedScript(bool silent) const |
| 1966 | { |
| 1967 | auto stripped = collectScript(silent); |
| 1968 | |
| 1969 | if (silent || PresetHandler::showYesNoWindow("Uglify Script", "Do you want to strip comments & whitespace before compressing?")) |
| 1970 | stripped = Helpers::uglify(stripped); |
| 1971 | |
| 1972 | MemoryOutputStream mos; |
| 1973 | GZIPCompressorOutputStream gos(&mos, 9); |
| 1974 | gos.writeString(stripped); |
| 1975 | gos.flush(); |
| 1976 | |
| 1977 | return mos.getMemoryBlock().toBase64Encoding(); |
| 1978 | } |
| 1979 | |
| 1980 | bool JavascriptProcessor::restoreBase64CompressedScript(const String &base64compressedScript) |
| 1981 | { |
nothing calls this directly
no test coverage detected