casts input void* to const char * to match decode method signature
added casts and __bridge to fix llvm complaints