Skip to content

Commit

Permalink
trancate unsed part of compressed
Browse files Browse the repository at this point in the history
  • Loading branch information
sv committed Dec 1, 2017
1 parent e76255d commit 13d7556
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func Compress(b []byte) (dst []byte) {
dst[c] = byte(f)
binary.LittleEndian.PutUint32(lenbuf, uint32(d))
copy(dst[4:], lenbuf)
return dst
return dst[:d:d]
}

// Encode data to ipc format as msgtype(sync/async/response) to specified writer
Expand Down

0 comments on commit 13d7556

Please sign in to comment.