Factory defines the record encode/decode factory interface
Note: Assumption is made that there is only one encoder at a time so it can write data to the target without
worrying about concurrent writes to the same stream. Multiplexing is not supported.