MCPcopy Create free account
hub / github.com/acl-dev/acl / encode_update

Method encode_update

lib_acl_cpp/src/mime/mime_code.cpp:70–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70void mime_code::encode_update(const char *src, int n, string* out)
71{
72 int i = 0;
73
74 while (n > 0) {
75 if (m_encodeCnt == (int) sizeof(m_encodeBuf)) {
76 encode(out);
77 m_encodeCnt = 0;
78 }
79 i = n;
80 if (i > (int) sizeof(m_encodeBuf) - m_encodeCnt) {
81 i = (int) sizeof(m_encodeBuf) - m_encodeCnt;
82 }
83 memcpy(m_encodeBuf + m_encodeCnt, src, i);
84 m_encodeCnt += i;
85 src += i;
86 n -= i;
87 }
88}
89
90void mime_code::encode_finish(string* out)
91{

Callers

nothing calls this directly

Calls 2

encodeFunction · 0.85
memcpyFunction · 0.85

Tested by

no test coverage detected