The authors propose a Crank-Nicolson-type difference scheme for solving the subdiffusion equation with fractional derivative. Only a tridiational linear system needs to be solved at each temporal level. The solvability, unconditional stability, and

${H}^{1}$ norm convergence are proved. The convergence order is

$min\{2-\gamma /2,1+\gamma \}$ in the temporal direction and two in the spatial direction. Using the Sobolev embedding inequality, the maximum norm error estimate is obtained. A spatial compact scheme based on the Crank-Nicolson-type difference scheme with the convergence order of

$O({\tau}^{min\{2-\gamma /2,1+\gamma \}}+{h}^{4})$ is also presented. Numerical examples support the theoretical analysis. Comparisons with the related existing works are presented to show the effectiveness of the present method. This is an interesting paper.