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

Method SerializeSize

tools/rsync/algorithm.go:96–108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

94var bin = binary.LittleEndian
95
96func (self Operation) SerializeSize() int {
97 switch self.Type {
98 case OpBlock:
99 return 9
100 case OpBlockRange:
101 return 13
102 case OpHash:
103 return 3 + len(self.Data)
104 case OpData:
105 return 5 + len(self.Data)
106 }
107 return -1
108}
109
110func (self Operation) Serialize(ans []byte) {
111 switch self.Type {

Callers 1

send_opMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected