Varieties of codes and Kraft inequality