1
0
Fork 0
mirror of https://github.com/Luzifer/vault-openvpn.git synced 2024-11-14 02:52:44 +00:00
vault-openvpn/vendor/github.com/pierrec/lz4/lz4_go1.10.go
Knut Ahlers 0285eefd46
Update dependencies
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2019-02-14 22:51:41 +01:00

29 lines
526 B
Go

//+build go1.10
package lz4
import (
"fmt"
"strings"
)
func (h Header) String() string {
var s strings.Builder
s.WriteString(fmt.Sprintf("%T{", h))
if h.BlockChecksum {
s.WriteString("BlockChecksum: true ")
}
if h.NoChecksum {
s.WriteString("NoChecksum: true ")
}
if bs := h.BlockMaxSize; bs != 0 && bs != 4<<20 {
s.WriteString(fmt.Sprintf("BlockMaxSize: %d ", bs))
}
if l := h.CompressionLevel; l != 0 {
s.WriteString(fmt.Sprintf("CompressionLevel: %d ", l))
}
s.WriteByte('}')
return s.String()
}