MCPcopy Index your code
hub / github.com/kovidgoyal/kitty / set_buffer_to_size

Method set_buffer_to_size

tools/rsync/algorithm.go:327–333  ·  view source on GitHub ↗
(sz int)

Source from the content-addressed store, hash-verified

325}
326
327func (r *rsync) set_buffer_to_size(sz int) {
328 if cap(r.buffer) < sz {
329 r.buffer = make([]byte, sz)
330 } else {
331 r.buffer = r.buffer[:sz]
332 }
333}
334
335// see https://rsync.samba.org/tech_report/node3.html
336type rolling_checksum struct {

Callers 1

ApplyDeltaMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected