Rename encode to encodeSink, for sinks.