message-size-increase #3
@ -9,7 +9,8 @@ type TablePushFunc func(tag uint16, value []byte) (n int, err error)
|
|||||||
type TablePullFunc func() (tag uint16, value []byte, n int, err error)
|
type TablePullFunc func() (tag uint16, value []byte, n int, err error)
|
||||||
|
|
||||||
func DecodeTable(data []byte) TablePullFunc {
|
func DecodeTable(data []byte) TablePullFunc {
|
||||||
return func() (tag uint16, value []byte, n int, err error) {
|
n := 0
|
||||||
|
return func() (tag uint16, value []byte, n_ int, err error) {
|
||||||
tag, nn, err := DecodeI16[uint16](data[n:])
|
tag, nn, err := DecodeI16[uint16](data[n:])
|
||||||
if err != nil { return tag, value, n, err }
|
if err != nil { return tag, value, n, err }
|
||||||
n += nn
|
n += nn
|
||||||
|
Loading…
Reference in New Issue
Block a user