MCPcopy Index your code
hub / github.com/go-git/go-git / WriteVariableWidthInt

Function WriteVariableWidthInt

utils/binary/write.go:20–32  ·  view source on GitHub ↗
(w io.Writer, n int64)

Source from the content-addressed store, hash-verified

18}
19
20func WriteVariableWidthInt(w io.Writer, n int64) error {
21 buf := []byte{byte(n & 0x7f)}
22 n >>= 7
23 for n != 0 {
24 n--
25 buf = append([]byte{0x80 | (byte(n & 0x7f))}, buf...)
26 n >>= 7
27 }
28
29 _, err := w.Write(buf)
30
31 return err
32}
33
34// WriteUint64 writes the binary representation of a uint64 into w, in BigEndian
35// order

Callers 4

encodeEntryNameV4Method · 0.92
writeOfsDeltaHeaderMethod · 0.92

Calls 1

WriteMethod · 0.45

Tested by 2

Used in the wild real call sites across dependent graphs

searching dependent graphs…