Poisson approximation in total variation can be successfully established in a wide variety of contexts, involving sums of weakly dependent random variables which usually take the value 0, and occasionally the value 1. If the random variables can take other positive integer values, or if there is stronger dependence between them, compound Poisson approximation may be more suitable. Stein's method, which is so effective in the Poisson context, turns out to be much more difficult to apply for compound Poisson approximation, because the solutions of the Stein equation have undesirable properties. In this paper, we prove new bounds on the absolute values of the solutions to the Stein equation and of their first differences, over certain ranges of their arguments. These enable compound Poisson approximation in total variation to be carried out with almost the same efficiency as in the Poisson case. Even for sums of independent random variables, which have been exhaustively studied in the past, new results are obtained, effectively solving a problem discussed by Le Cam (1965, Bernoulli, Bayes, Laplace. Springer, New York, pp. 179–202), in the context of nonnegative integer valued random variables.