fixed types.h and encoding.h, porting tests ...
updated codec API usage
resolved