Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pquerna/ffjson
/ p2
Function
p2
inception/encoder.go:360–369 ·
view source on GitHub ↗
(v uint32)
Source
from the content-addressed store, hash-verified
358
}
359
360
func
p2(v uint32) uint32 {
361
v--
362
v |= v >> 1
363
v |= v >> 2
364
v |= v >> 4
365
v |= v >> 8
366
v |= v >> 16
367
v++
368
return
v
369
}
370
371
func
getTypeSize(t reflect.Type) uint32 {
372
switch
t.Kind() {
Callers
1
getBufGrowSize
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected