Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/segmentio/encoding
/ Reset
Method
Reset
thrift/encode.go:52–55 ·
view source on GitHub ↗
(w Writer)
Source
from the content-addressed store, hash-verified
50
}
51
52
func
(e *Encoder) Reset(w Writer) {
53
e.w = w
54
e.f = e.f.without(protocolFlags).with(encoderFlags(w))
55
}
56
57
func
encoderFlags(w Writer) flags {
58
return
flags(w.Protocol().Features() << featuresBitOffset)
Callers
2
benchmarkMarshal
Function · 0.45
benchmarkUnmarshal
Function · 0.45
Calls
3
encoderFlags
Function · 0.85
with
Method · 0.45
without
Method · 0.45
Tested by
2
benchmarkMarshal
Function · 0.36
benchmarkUnmarshal
Function · 0.36