In this paper, a class of compact higher-order gas-kinetic schemes (GKS) with spectral resolution will be presented. Based on the high-order gas evolution model in GKS, both the interface flux function and conservative flow variables can be evaluated explicitly from the time-accurate gas distribution function. As a result, inside each control volume both the cell-averaged flow variables and their cell-averaged gradients can be updated within each time step. The flow variable update and slope update are coming from the same physical solution at the cell interface. Different from many other approaches, such as HWENO, there are no additional governing equations in GKS for the slopes or equivalent degrees of freedom independently inside each cell. Therefore, based on both cell averaged values and their slopes, compact 6th-order and 8th-order linear and nonlinear reconstructions can be developed. As analyzed in this paper, the local linear compact reconstruction can achieve a spectral-like resolution at large wavenumber than the well-established compact scheme of Lele with globally coupled flow variables and their derivatives. For nonlinear gas dynamic evolution, in order to avoid spurious oscillation in discontinuous region, the above compact linear reconstruction from the symmetric stencil can be divided into sub-stencils and apply a biased nonlinear WENO-Z reconstruction. Consequently discontinuous solutions can be captured through the 6th-order and 8th-order compact WENO-type nonlinear reconstruction. In GKS, the time evolution solution of the gas distribution function at a cell interface is based on an integral solution of the kinetic model equation, which covers a physical process from an initial non-equilibrium state to a final equilibrium one. Since the initial non-equilibrium state is obtained based on the nonlinear WENO-Z reconstruction, and the equilibrium state is basically constructed from the linear symmetric reconstruction, the GKS evolution models unifies the nonlinear and linear reconstructions in gas evolution process for the determination of a time-dependent gas distribution function, which gives great advantages in capturing both discontinuous shock wave and the linear aero-acoustic wave in a single computation due to dynamical adaptation of non-equilibrium and equilibrium state from GKS evolution model in different regions. This dynamically adaptive model helps to solve a long lasting problem in the development of high-order schemes about the choices of the linear and nonlinear reconstructions. Compared with discontinuous Galerkin 1 arXiv:1901.00261v1 [physics.comp-ph] 2 Jan 2019 (DG) scheme, the current compact GKS uses the same local and compact stencil, achieves the 6th-order and 8th-order accuracy, uses a much larger time step with CFL number ≥ 0.3, has the robustness as a 2nd-order scheme, and gets accurate solutions in both shock and smooth regions without introducing trouble cell and additional limiting process. The nonlinear reconstruction in the compact scheme is solely based on the WENO-...