Codec represents a compression codec to encode and decode the messages. See : https://cwiki.apache.org/confluence/display/KAFKA/Compression A Codec must be safe for concurrent access by multiple go routines.
| 87 | // |
| 88 | // A Codec must be safe for concurrent access by multiple go routines. |
| 89 | type Codec interface { |
| 90 | // Code returns the compression codec code |
| 91 | Code() int8 |
| 92 | |
| 93 | // Human-readable name for the codec. |
| 94 | Name() string |
| 95 | |
| 96 | // Constructs a new reader which decompresses data from r. |
| 97 | NewReader(r io.Reader) io.ReadCloser |
| 98 | |
| 99 | // Constructs a new writer which writes compressed data to w. |
| 100 | NewWriter(w io.Writer) io.WriteCloser |
| 101 | } |
| 102 | |
| 103 | var ( |
| 104 | // The global gzip codec installed on the Codecs table. |
no outgoing calls
no test coverage detected