MCPcopy Create free account
hub / github.com/Tencent/tgfx / WriteOptimizedByteString

Function WriteOptimizedByteString

src/pdf/PDFUnion.cpp:75–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75void WriteOptimizedByteString(const std::shared_ptr<WriteStream>& stream, const char* data,
76 size_t length, size_t literalExtras) {
77 const size_t hexLength = 2 + (2 * length);
78 const size_t literalLength = 2 + length + literalExtras;
79 if (literalLength <= hexLength) {
80 WriteLiteralByteString(stream, data, length);
81 } else {
82 WriteHexByteString(stream, data, length);
83 }
84}
85
86void WriteByteString(const std::shared_ptr<WriteStream>& stream, const char* data, size_t length) {
87 size_t literalExtras = 0;

Callers 2

WriteByteStringFunction · 0.70
WriteTextStringFunction · 0.70

Calls 2

WriteLiteralByteStringFunction · 0.70
WriteHexByteStringFunction · 0.70

Tested by

no test coverage detected