Pure cocoa is richer in fats than carob and contains fewer sugars.
Below there is a table with the nutritional composition of carob flour.