The wide-ranging requirements for the photon properties from multiple beamlines in superconducting based free-electron lasers (FELs) demand more challenging beam manipulation techniques. Shot-by-shot control of electron beam bunch length and peak current at high repetition rate up to megahertz is highly desired. In this paper, we present a comprehensive study of a method based on a 2-m-long normal conducting radio-frequency cavity to achieve fast and flexible control of beam compression and realize the full potential of the facility, including theoretical analysis, beam dynamics simulations, and conceptual cavity design for the Linac Coherent Light Source II and its high-energy upgrade. We illustrate the physical mechanism of the chirping cavity on the control of the final beam compression and propose methods to lower the requirements for the cavity parameters. The application of this method will allow tailored photon properties of individual beamlines to optimize their performance and drastically improve the multiplexing capabilities of a high-repetition rate FEL facility.