mirror of
https://gitee.com/johng/gf.git
synced 2024-12-05 05:37:55 +08:00
13 lines
211 B
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))
|
|
} |