gf/geg/other/test2.go

13 lines
211 B
Go

package main
import (
"fmt"
"gitee.com/johng/gf/g/encoding/gbinary"
)
func main() {
pid := 41902
b := gbinary.EncodeByLength(2, pid)
fmt.Println(b)
fmt.Println(gbinary.DecodeToInt(b))
}