Space-time residual minimization with efficient linear solver based on matrix compression