Decomposition of carbon-containing compounds into carbon