MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / skip_content_with_length

Function skip_content_with_length

examples/server/httplib.h:3512–3521  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3510}
3511
3512inline void skip_content_with_length(Stream &strm, uint64_t len) {
3513 char buf[CPPHTTPLIB_RECV_BUFSIZ];
3514 uint64_t r = 0;
3515 while (r < len) {
3516 auto read_len = static_cast<size_t>(len - r);
3517 auto n = strm.read(buf, (std::min)(read_len, CPPHTTPLIB_RECV_BUFSIZ));
3518 if (n <= 0) { return; }
3519 r += static_cast<uint64_t>(n);
3520 }
3521}
3522
3523inline bool read_content_without_length(Stream &strm,
3524 ContentReceiverWithProgress out) {

Callers 1

read_contentFunction · 0.85

Calls 1

readMethod · 0.45

Tested by

no test coverage detected