feat: gRPC gun implement extended writer

This commit is contained in:
H1JK
2023-01-16 15:54:20 +08:00
parent ead21f37d7
commit 926ef9e33d
2 changed files with 35 additions and 2 deletions

10
transport/gun/utils.go Normal file
View File

@@ -0,0 +1,10 @@
package gun
func UVarintLen(x uint64) int {
i := 0
for x >= 0x80 {
x >>= 7
i++
}
return i + 1
}