You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+48-48Lines changed: 48 additions & 48 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,36 +1,55 @@
1
1
Hash Stable Pack
2
2
=======
3
-
This is a code generation tool and serialization library for Calculation of Stable Hash for content. Basically it will generate an `MarshalHash` method which follow the MessagePack but **without the key**.
3
+
This is a code generation tool for **QUICK** struct content compare or hash computation.
4
4
5
5
### For
6
-
- Quick compare nested struct without reflection
7
-
- Quick calculation of struct hash or signature without reflection
6
+
- Quick compare nested struct without reflection (10~20 times faster)
- MessagePack: member name is unnecessary, different implementation may add some fields which made result undetermined.
101
+
- MessagePack: member name is unnecessary, different implementation may add some fields which made result undetermined.And also golang's map...
86
102
- Prorobuf: struct must defined in proto language, and other limitations discussed [here](https://gist.github.com/kchristidis/39c8b310fd9da43d515c4394c3cd9510)
87
103
88
104
### Quickstart
@@ -122,22 +138,6 @@ func (z *Test) Msgsize() (s int)
122
138
- Supportfor arbitrary type system extensions
123
139
- File-based dependency model means fast codegen regardless of source tree size.
124
140
125
-
Consider the following:
126
-
```go
127
-
const Eight = 8
128
-
type MyInt int
129
-
type Data []byte
130
-
131
-
type Struct struct {
132
-
Which map[string]*MyInt
133
-
Other Data
134
-
Nums [Eight]float64
135
-
}
136
-
```
137
-
As long as the declarations of `MyInt` and `Data` are in the same file as `Struct`, the parser will determine that the type information for `MyInt` and `Data` can be passed into the definition of `Struct` before its methods are generated.
138
-
139
-
### Known issues
140
-
- map type is not supported. will cause undetermined marshal content.
0 commit comments