Class GzipStatefulCodec

java.lang.Object
io.datarouter.bytes.compress.gzip.GzipStatefulCodec
All Implemented Interfaces:
Codec<byte[],byte[]>

public class GzipStatefulCodec extends Object implements Codec<byte[],byte[]>
Currently reuses ByteArrayOutputStreams. Could be enhanced to reuse the Gzip streams, but that is non-trivial. Not thread safe.
  • Constructor Details

    • GzipStatefulCodec

      public GzipStatefulCodec()
  • Method Details

    • encode

      public byte[] encode(byte[] value)
      Specified by:
      encode in interface Codec<byte[],byte[]>
    • decode

      public byte[] decode(byte[] encodedValue)
      Specified by:
      decode in interface Codec<byte[],byte[]>