Text this: Formation of long nanosecond rectangular pulses in the active RF pulse compression system with a compact resonant cavity