Write the record (header_len + header + body) at dst; returns its length.
| 453 | |
| 454 | // Write the record (header_len + header + body) at dst; returns its length. |
| 455 | static int rec_write(const RecordBuilder *r, uint8_t *dst) { |
| 456 | int pos = put_varint(dst, rec_total_header(r)); |
| 457 | memcpy(dst + pos, r->header.data, r->header.len); |
| 458 | pos += r->header.len; |
| 459 | memcpy(dst + pos, r->body.data, r->body.len); |
| 460 | return pos + r->body.len; |
| 461 | } |
| 462 | |
| 463 | static uint8_t *rec_finalize(RecordBuilder *r, int *out_len) { |
| 464 | *out_len = 0; |
no test coverage detected