aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/ClickHouse/ch-go/proto/compression.go
blob: f3fc6f904378b6d6c98d9d7b475ef73b48b88f6b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package proto

//go:generate go run github.com/dmarkham/enumer -type Compression -trimprefix Compression -output compression_enum.go

// Compression status.
type Compression byte

// Compression statuses.
const (
	CompressionDisabled Compression = 0
	CompressionEnabled  Compression = 1
)

// Encode to buffer.
func (c Compression) Encode(b *Buffer) {
	b.PutUVarInt(uint64(c))
}