A device for compressing or for pumping a fluid, comprising a stationary part, at least one rotor and a rotor shaft, each rotor being integral with the rotor shaft, the rotor shaft being configured to be rotated about a longitudinal axis, each rotor comprising blades extending substantially radially to the longitudinal axis, and at least one of the at least one rotor being a shrouded rotor comprising a circumferential shroud connecting the peripheral radial tips of the blades, the stationary part comprising at least one stator and at least one external portion surrounding each rotor, the device comprising a clearance between the outer surface of each circumferential shroud of the shrouded rotor and the inner surface of the at least one external portion surrounding this shrouded rotor, allowing a clearance flow in the a direction opposite to a direction of principal fluid flow through the shrouded rotor, characterized in that the stator upstream from the shrouded rotor in the direction of the principal fluid flow through the shrouded rotor comprises a reduction means for reducing the tangential velocity of the fluid from the clearance flow, each reduction means being positioned axially opposite each shroud of the shrouded rotor and/or the clearance, upstream from the shrouded rotor in the direction of the principal fluid flow through the shrouded rotor.