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

Method decodeBase64ValueTree

hi_scripting/scripting/api/ScriptingApi.cpp:1991–2021  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1989
1990
1991String ScriptingApi::Engine::decodeBase64ValueTree(const String& b64Data)
1992{
1993 zstd::ZDefaultCompressor comp;
1994
1995
1996
1997 auto v = ValueTreeConverters::convertBase64ToValueTree(b64Data, true);
1998
1999 if (!v.isValid())
2000 {
2001 auto r = comp.expand(b64Data, v);
2002
2003 if (!r.wasOk())
2004 {
2005 MemoryBlock mb;
2006 mb.fromBase64Encoding(b64Data);
2007
2008 v = ValueTree::readFromData(mb.getData(), mb.getSize());
2009 }
2010 }
2011
2012
2013
2014 if (v.isValid())
2015 {
2016 auto xml = v.createXml();
2017 return xml->createDocument("");
2018 }
2019
2020 return {};
2021}
2022
2023var ScriptingApi::Engine::createGlobalScriptLookAndFeel()
2024{

Callers

nothing calls this directly

Calls 8

fromBase64EncodingMethod · 0.80
createDocumentMethod · 0.80
isValidMethod · 0.45
expandMethod · 0.45
wasOkMethod · 0.45
getDataMethod · 0.45
getSizeMethod · 0.45
createXmlMethod · 0.45

Tested by

no test coverage detected