add gem magic_encoding