MCPcopy Create free account
hub / github.com/CalcProgrammer1/OpenRGB / read_content_without_length

Function read_content_without_length

dependencies/httplib/httplib.h:3325–3342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3323}
3324
3325inline bool read_content_without_length(Stream &strm,
3326 ContentReceiverWithProgress out) {
3327 char buf[CPPHTTPLIB_RECV_BUFSIZ];
3328 uint64_t r = 0;
3329 for (;;) {
3330 auto n = strm.read(buf, CPPHTTPLIB_RECV_BUFSIZ);
3331 if (n < 0) {
3332 return false;
3333 } else if (n == 0) {
3334 return true;
3335 }
3336
3337 if (!out(buf, static_cast<size_t>(n), r, 0)) { return false; }
3338 r += static_cast<uint64_t>(n);
3339 }
3340
3341 return true;
3342}
3343
3344inline bool read_content_chunked(Stream &strm,
3345 ContentReceiverWithProgress out) {

Callers 1

read_contentFunction · 0.85

Calls 1

readMethod · 0.45

Tested by

no test coverage detected