  This study focuses on statistical inference for compound models of the form
$X=\xi_1+\ldots+\xi_N$, where $N$ is a random variable denoting the count of
summands, which are independent and identically distributed (i.i.d.) random
variables $\xi_1, \xi_2, \ldots$. The paper addresses the problem of
reconstructing the distribution of $\xi$ from observed samples of $X$'s
distribution, a process referred to as decompounding, with the assumption that
$N$'s distribution is known. This work diverges from the conventional scope by
not limiting $N$'s distribution to the Poisson type, thus embracing a broader
context. We propose a nonparametric estimate for the density of $\xi$, derive
its rates of convergence and prove that these rates are minimax optimal for
suitable classes of distributions for $\xi$ and $N$. Finally, we illustrate the
numerical performance of the algorithm on simulated examples.
