diff --git a/arbcompress/compress_common.go b/arbcompress/compress_common.go index 0ce8db079a..a61dd9a171 100644 --- a/arbcompress/compress_common.go +++ b/arbcompress/compress_common.go @@ -18,5 +18,5 @@ func compressedBufferSizeFor(length int) int { } func CompressLevel(input []byte, level int) ([]byte, error) { - return Compress(input, level, EmptyDictionary) + return Compress(input, uint32(level), EmptyDictionary) } diff --git a/arbcompress/native.go b/arbcompress/native.go index c816019322..4624d6222e 100644 --- a/arbcompress/native.go +++ b/arbcompress/native.go @@ -30,7 +30,7 @@ func CompressWell(input []byte) ([]byte, error) { return Compress(input, LEVEL_WELL, EmptyDictionary) } -func Compress(input []byte, level int, dictionary Dictionary) ([]byte, error) { +func Compress(input []byte, level uint32, dictionary Dictionary) ([]byte, error) { maxSize := compressedBufferSizeFor(len(input)) output := make([]byte, maxSize) outbuf := sliceToBuffer(output)