API for stackable stateful encoders and decoders. Such codec interfaces allow for the efficient processing of data as it is made available while maintaining small actively processing footprints. Of course these aspects depend on the implementation as well however this API standardizes the minimum set of interfaces associated with codec's that are stateful. Until this API is added to the commons-codec project several interfaces and classes here are duplicated to minimize the number of dependencies: namely a dependency on commons-codec will be avoided.