cmd/htpacker: lots more WIP

This commit is contained in:
Laurence Withers 2019-03-29 09:18:07 +00:00
commit 84ea7c3673
4 changed files with 227 additions and 17 deletions

View file

@ -50,14 +50,20 @@ func Inspect(filename string) error {
fmt.Printf(" • %s\n"+
" · Etag: %s\n"+
" · Content type: %s\n"+
" · Uncompressed: %s (offset %d)\n"+
" · Gzipped: %s (offset %d)\n"+
" · Brotli: %s (offset %d)\n",
" · Uncompressed: %s (offset %d)\n",
path, info.Etag, info.ContentType,
printSize(info.Uncompressed.Length), info.Uncompressed.Offset,
printSize(info.Gzip.Length), info.Gzip.Offset,
printSize(info.Brotli.Length), info.Brotli.Offset,
)
printSize(info.Uncompressed.Length),
info.Uncompressed.Offset)
if info.Gzip != nil {
fmt.Printf(" · Gzipped: %s (offset %d)\n",
printSize(info.Gzip.Length), info.Gzip.Offset)
}
if info.Brotli != nil {
fmt.Printf(" · Brotli: %s (offset %d)\n",
printSize(info.Brotli.Length), info.Brotli.Offset)
}
}
}
return err