Add base encoder class.
Add mimetype parsing