Feed
Data to encode is fed into consume and, as the Encoder.Feed's buffer fills, encoded data is output to the supplied Encoder.OutFeed. This allows for a "lazy" encode, or streaming of encoded data.
Once all data has been fed through consume, call doFinal to process remaining data in the Encoder.Feed buffer. Alternatively, utilize the use extension function (highly recommended) which will call doFinal (or close if there was an error with encoding) for you.
See also
Properties
For implementations to pass in as a constructor argument and reference while performing encoding operations. Upon close being called, this is set to the Encoder.OutFeed.NoOp instance which ensures any local object references that the initial OutFeed has are not leaked and can be promptly GCd.
Functions
Updates the Encoder.Feed with a new byte to encode.