So, I'm working on a flintlock fantasy series, and my protagonist is what's called an Arcane Engineer. This is someone who makes magical devices. Among those she has made there is a mask that let her breathe both underwater and in environments where there's smoke or other gases that would be bad to inhale.
My thinking is that the masks works by converting the CO2 she exhales into O2, similar to the way plants do when they perform photosynthesis. However, this leaves the issue of what to do with the carbon in the carbon dioxide. The temperature of atoms would not be changed, only how they are arranged into molecules.
Any other gases she exhaled are not affected and simply pass through the mask. When she inhales, any CO2 in the air is likewise converted, benign gases are permitted through, and toxic gases are blocked.
So: What should the mask do with the carbon? That's what I'm trying to figure out right now. The answer will have some effect on how the mask is designed. (Like if it has to have some kind of container where the carbon will go after it is separated from the O2.) Suggestions?