Skip to content

Commit ba1dcc9

Browse files
committed
Update based on review
1 parent 8d78a72 commit ba1dcc9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

serialization/serialization.go

+1
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ func decodeString(data []byte, pos uint64) (string, uint64, error) {
207207

208208
func decodeFixed(data []byte, pos uint64, intlen int) ([]byte, uint64, error) {
209209
var b bytes.Buffer
210+
b.Grow(intlen * 2) // output is between 1 and 2 times that of the input
210211

211212
for {
212213
if len(data) < int(pos)+1 {

0 commit comments

Comments
 (0)