In this paper, a conservative compact difference scheme for the generalized Kawahara equation is constructed based on the scalar auxiliary variable (SAV) approach. The discrete conservative laws of mass and Hamiltonian energy and boundedness estimates are studied in detail. The error estimates in discrete $L^{\infty}$-norm and $L^2$-norm of the presented scheme are analyzed by using the discrete energy method. We give an efficiently algorithm of the presented scheme which only needs to solve two decoupled equations.