Implemented codec.