  We consider an initial-boundary value problem for the $n$-dimensional wave
equation with the variable sound speed, $n\geq 1$. We construct three-level
implicit in time and compact in space (three-point in each space direction) 4th
order finite-difference schemes on the uniform rectangular meshes including
their one-parameter (for $n=2$) and three-parameter (for $n=3$) families. We
also show that some already known methods can be converted into such schemes.
In a unified manner, we prove the conditional stability of schemes in the
strong and weak energy norms together with the 4th order error estimate under
natural conditions on the time step. We also transform an unconditionally
stable 4th order two-level scheme suggested for $n=2$ to the three-level form,
extend it for any $n\geq 1$ and prove its stability. We also give an example of
a compact scheme for non-uniform in space and time rectangular meshes. We
suggest simple fast iterative methods based on FFT to implement the schemes. A
new effective initial guess to start iterations is given too. We also present
promising results of numerical experiments.
