Skip to content

Commit

Permalink
Merge pull request #4 from vipally/develop
Browse files Browse the repository at this point in the history
fix issue#1 nil pointer encode/decode error
pack 8 bool values as bits in one byte
put one bool bit for pointer fields to check if it is nil pointer
  • Loading branch information
vipally authored Nov 1, 2017
2 parents f1b07fa + ea070d7 commit b52aa27
Show file tree
Hide file tree
Showing 5 changed files with 359 additions and 312 deletions.
18 changes: 17 additions & 1 deletion bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,23 @@ import (
"testing"
)

type regedStruct Struct
type regedStruct struct {
Int8 int8
Int16 int16
Int32 int32
Int64 int64
Uint8 uint8
Uint16 uint16
Uint32 uint32
Uint64 uint64
Float32 float32
Float64 float64
Complex64 complex64
Complex128 complex128
Array [4]uint8
Bool bool
BoolArray [4]bool
}

var (
buff = make([]byte, 8192)
Expand Down
Loading

0 comments on commit b52aa27

Please sign in to comment.