This commit is contained in:
Chris Lu
2021-09-03 23:25:33 -07:00
parent bbc77f7af4
commit 8ec357b3d3
5 changed files with 233 additions and 42 deletions

View File

@@ -1,21 +0,0 @@
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))
}