github.com/koko1123/flow-go-1@v0.29.6/network/compressor.go (about) 1 package network 2 3 import ( 4 "io" 5 ) 6 7 // Compressor offers compressing and decompressing services for sending and receiving 8 // a byte slice at network layer. 9 type Compressor interface { 10 NewReader(io.Reader) (io.ReadCloser, error) 11 NewWriter(io.Writer) (WriteCloseFlusher, error) 12 } 13 14 type WriteCloseFlusher interface { 15 io.WriteCloser 16 Flush() error 17 }