@Override public Encoder getEncoder(OutputStream os) { return (compression == null) ? new KeyValueCodec.KeyValueEncoder((DataOutputStream) os) : new CompressedKvEncoder((DataOutputStream) os, compression); }