github.com/streamdal/segmentio-kafka-go@v0.4.47-streamdal/snappy/snappy.go (about) 1 // Package snappy does nothing, it's kept for backward compatibility to avoid 2 // breaking the majority of programs that imported it to install the compression 3 // codec, which is now always included. 4 package snappy 5 6 import "github.com/segmentio/kafka-go/compress/snappy" 7 8 type CompressionCodec = snappy.Codec 9 10 type Framing = snappy.Framing 11 12 const ( 13 Code = 2 14 Framed = snappy.Framed 15 Unframed = snappy.Unframed 16 ) 17 18 func NewCompressionCodec() *CompressionCodec { 19 return NewCompressionCodecFraming(Framed) 20 } 21 22 func NewCompressionCodecFraming(framing Framing) *CompressionCodec { 23 return &CompressionCodec{Framing: framing} 24 }