A gzip compressor and decompressor. In the future this will likely support other compression methods, such as compression level.
| 33 | * compression methods, such as compression level. |
| 34 | */ |
| 35 | final class Gzip implements Codec { |
| 36 | @Override |
| 37 | public String getMessageEncoding() { |
| 38 | return "gzip"; |
| 39 | } |
| 40 | |
| 41 | @Override |
| 42 | public OutputStream compress(OutputStream os) throws IOException { |
| 43 | return new GZIPOutputStream(os); |
| 44 | } |
| 45 | |
| 46 | @Override |
| 47 | public InputStream decompress(InputStream is) throws IOException { |
| 48 | return new GZIPInputStream(is); |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | /** |
| 53 | * The "identity", or "none" codec. This codec is special in that it can be used to explicitly |
nothing calls this directly
no outgoing calls
no test coverage detected