Skip to content

Commit 60b2e98

Browse files
authored
Merge pull request #3 from bwplotka/fix
fix(alp): adjust len of dst for constant case
2 parents c062d1d + 506a102 commit 60b2e98

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

alp/alp.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ func Encode(dst []byte, src []float64) []byte {
6666
if cap(dst) < MetadataSize {
6767
dst = make([]byte, MetadataSize)
6868
}
69+
dst = dst[:MetadataSize]
6970
encodeMetadata(dst, CompressionMetadata{
7071
EncodingType: EncodingConstant,
7172
Count: int32(len(src)),

0 commit comments

Comments
 (0)