Due to the quasi-zero-stiffness and overload protection characteristics, constant-force mechanisms can be widely used in nonlinear vibration control, high-efficiency shock isolation, and other engineering fields. As a preparatory work for the further applications, this paper presents a cam-based constant-force compression mechanism and validates the quasi-static characteristics experimentally. By employing the friction considered profile identification method to design the cam and through the interaction between the cam and spring-sliders, the constant-force compression mechanism can passively output the desired constant force over a sufficiently large displacement. The design theory is firstly introduced in detail. Through establishing and solving the differential relationship between the lateral elastic force and vertical constant force, the constant-force compression mechanism under various frictional conditions can be designed. Then, constant-force compression mechanism prototypes corresponding to sliding and rolling friction are designed, fabricated and tested respectively. The results show that both the prototypes have the satisfactory characteristics as with the design requirements. Moreover, the relative generality and stronger engineering applicability of the proposed friction considered profile identification method are proved since it can not only cover the frictionless (micro-friction) cases, but keep the constant-force behavior of the constant-force compression mechanism under the nonignorable friction conditions. Therefore, compared with the existing cam-roller constant-force mechanisms that must ensure the ignoring micro-friction demand, the presented constant-force compression mechanism taking friction into consideration has important engineering significance since it can reduce this machining requirement.