github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/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 }