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

Function rec_add_blob

internal/cbm/sqlite_writer.c:388–396  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

386}
387
388static void rec_add_blob(RecordBuilder *r, const uint8_t *data, int len) {
389 int64_t st = len > 0 ? ((int64_t)len * BLOB_SERIAL_MUL) + BLOB_SERIAL_BASE : 0;
390 uint8_t vbuf[VARINT_MAX_BYTES];
391 int vlen = put_varint(vbuf, st);
392 dynbuf_append(&r->header, vbuf, vlen);
393 if (len > 0 && data) {
394 dynbuf_append(&r->body, data, len);
395 }
396}
397
398// Finalize: returns the complete record bytes (header_len + header + body).
399// Caller must free the returned buffer.

Callers 2

build_vector_recordFunction · 0.85
build_token_vec_recordFunction · 0.85

Calls 2

put_varintFunction · 0.85
dynbuf_appendFunction · 0.85

Tested by

no test coverage detected