I found two definitions of compact object.
(Lurie, Jacob (2009), Higher topos theory) Let $\mathcal{C}$ be a category which admits filtered colimits. An object $C \in \mathcal{C}$ is said to be compact if the corepresentable functor $$ \operatorname{Hom}_{e}(C, \bullet) $$ commutes with filtered colimits.
(Abelian Categories. Daniel Murfet) Let $\mathcal{C}$ be a category and $A$ an object of $\mathcal{C}$. We say that $A$ is compact (or sometimes small) if whenever we have a morphism $u: A \longrightarrow \bigoplus_{i \in I} A_{i}$ from $A$ into a nonempty coproduct, there is a nonempty finite subset $J \subseteq I$ and a factorisation of $u$ of the following form $$ A \longrightarrow \bigoplus_{j \in J} A_{j} \longrightarrow \bigoplus_{i \in I} A_{i}. $$
I don't know how to show that they are equivalent, could you please help me?
In addition, we have the definition of the generator of an abelian category.
(GENERATORS VERSUS PROJECTIVE GENERATORS INABELIAN CATEGORIESCHARLES PAQUETTE) Let $\mathcal{A}$ be an abelian category. An object $M$ of $\mathcal{A}$ is a generator of $\mathcal{A}$ if for any object $X$ of $\mathcal{A}$, we have an epimorphism $\bigoplus_{i\in I} M\to X$ where $I$ is some index set.
So what should be the compact generator? Is it a generator such that there is a factorisation of the following form? $$ \bigoplus_{i\in I} M \to \bigoplus_{i\in J} M \to X. $$ (all arrows are reversed??)
Thank you very much!