Porting generic decoder