MCPcopy Create free account
hub / github.com/KebsCS/KBotExt / Decode85

Function Decode85

KBotExt/imgui/imgui_draw.cpp:2157–2166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2155static const char* GetDefaultCompressedFontDataTTFBase85();
2156static unsigned int Decode85Byte(char c) { return c >= '\\' ? c - 36 : c - 35; }
2157static void Decode85(const unsigned char* src, unsigned char* dst)
2158{
2159 while (*src)
2160 {
2161 unsigned int tmp = Decode85Byte(src[0]) + 85 * (Decode85Byte(src[1]) + 85 * (Decode85Byte(src[2]) + 85 * (Decode85Byte(src[3]) + 85 * Decode85Byte(src[4]))));
2162 dst[0] = ((tmp >> 0) & 0xFF); dst[1] = ((tmp >> 8) & 0xFF); dst[2] = ((tmp >> 16) & 0xFF); dst[3] = ((tmp >> 24) & 0xFF); // We can't assume little-endianness.
2163 src += 5;
2164 dst += 4;
2165 }
2166}
2167
2168// Load embedded ProggyClean.ttf at size 13, disable oversampling
2169ImFont* ImFontAtlas::AddFontDefault(const ImFontConfig* font_cfg_template)

Calls 1

Decode85ByteFunction · 0.85

Tested by

no test coverage detected