MCPcopy Index your code
hub / github.com/codeaashu/claude-code / entryBytes

Function entryBytes

src/services/teamMemorySync/index.ts:436–439  ·  view source on GitHub ↗
(k: string, v: string)

Source from the content-addressed store, hash-verified

434 // strings handles escaping so the count matches what axios serializes.
435 const EMPTY_BODY_BYTES = Buffer.byteLength('{"entries":{}}', 'utf8')
436 const entryBytes = (k: string, v: string): number =>
437 Buffer.byteLength(jsonStringify(k), 'utf8') +
438 Buffer.byteLength(jsonStringify(v), 'utf8') +
439 2 // colon + comma (comma over-counts by 1 on the last entry; harmless slack)
440
441 const batches: Array<Record<string, string>> = []
442 let current: Record<string, string> = {}

Callers 1

batchDeltaByBytesFunction · 0.85

Calls 1

jsonStringifyFunction · 0.85

Tested by

no test coverage detected