MCPcopy Create free account
hub / github.com/christophhart/HISE / getBase64CompressedScript

Method getBase64CompressedScript

hi_scripting/scripting/ScriptProcessor.cpp:1965–1978  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1963
1964
1965String 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
1980bool JavascriptProcessor::restoreBase64CompressedScript(const String &base64compressedScript)
1981{

Callers

nothing calls this directly

Calls 4

toBase64EncodingMethod · 0.80
getMemoryBlockMethod · 0.80
writeStringMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected