(b []byte)
| 67 | type strCounter int |
| 68 | |
| 69 | func (o *strCounter) Write(b []byte) (n int, err error) { |
| 70 | if msgp.NextType(b) == msgp.StrType { |
| 71 | *o++ |
| 72 | } |
| 73 | return len(b), nil |
| 74 | } |
| 75 | |
| 76 | func countStrings(bts []byte) int { |
| 77 | r := msgp.NewReader(bytes.NewReader(bts)) |