MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / rec_add_blob

Function rec_add_blob

internal/cbm/sqlite_writer.c:423–431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

421}
422
423static void rec_add_blob(RecordBuilder *r, const uint8_t *data, int len) {
424 int64_t st = len > 0 ? ((int64_t)len * BLOB_SERIAL_MUL) + BLOB_SERIAL_BASE : 0;
425 uint8_t vbuf[VARINT_MAX_BYTES];
426 int vlen = put_varint(vbuf, st);
427 dynbuf_append(&r->header, vbuf, vlen);
428 if (len > 0 && data) {
429 dynbuf_append(&r->body, data, len);
430 }
431}
432
433// Finalize: returns the complete record bytes (header_len + header + body).
434// Caller must free the returned buffer.

Callers 2

fill_vector_recordFunction · 0.85
fill_token_vec_recordFunction · 0.85

Calls 2

put_varintFunction · 0.85
dynbuf_appendFunction · 0.85

Tested by

no test coverage detected