aboutsummaryrefslogtreecommitdiff
path: root/weed/util/compression_test.go
blob: b515e8988bc112d0d0f833fc7d9bca73ed6a481f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package util

import (
	"testing"

	"golang.org/x/tools/godoc/util"
)

func TestIsGzippable(t *testing.T) {
	buf := make([]byte, 1024)

	isText := util.IsText(buf)

	if isText {
		t.Error("buf with zeros are not text")
	}

	compressed, _ := GzipData(buf)

	t.Logf("compressed size %d\n", len(compressed))
}