However it can't be the only thing you eat. There were some studies about using spirulina on a spacecraft (or sub) for both 100% of oxygen and food. While it was feasible, it was pretty energy intensive and would tend to kill you after a few months. Something about more protein in the blood than your kidneys could filter? Will try to find a link.