gf/geg/other/test2.go

13 lines
211 B
Go
Raw Normal View History

2018-10-26 11:02:15 +08:00
package main
import (
"fmt"
"gitee.com/johng/gf/g/encoding/gbinary"
2018-10-26 11:02:15 +08:00
)
func main() {
pid := 41902
b := gbinary.EncodeByLength(2, pid)
fmt.Println(b)
fmt.Println(gbinary.DecodeToInt(b))
2018-10-26 11:02:15 +08:00
}