portable config file encoder and decoder in c