Compression phaser rifles are among the most powerful personnel-carried weapons in the Starfleet arsenal, and are an alternative to the type-3 phaser rifle. These powerful weapons are assigned to starships that could possibly see intense close-quarters or surface combat.
The USS Voyager was equipped with compression rifles as a standard part of its weapons inventory. They were first used by an away team which transported to the Caretaker's array in 2371. (VOY episode: "Caretaker")
The crew of the USS Enterprise-E used compression rifles numerous times. These included warding off invading Borg, protecting the Baku, and assaulting invading Remans. (TNG movies: Star Trek: First Contact, Star Trek: Insurrection, Star Trek: Nemesis)
On more hazardous missions, Starfleet officers carried the compression phaser rifle as a greater source of firepower. The rifle fired pulses of a similar but more powerful type to the phaser in a tight beam. The compression phaser rifle also fired a more deadly and silent sniper shot, which required more energy but could be very effective on infiltration missions. (VOY video game: Elite Force, TNG video game: Elite Force II)