A compressor, comprising a cylinder block and a piston assembly arranged inside the cylinder block; wherein the piston assembly comprises a first piston, a second piston arranged inside the first piston, and a movable assembly connected to the first piston, and the movable assembly is configured to drive the first piston and the second piston to reciprocate; the cylinder block is provided with a first compression chamber that defines a space for the first piston to move up and down, and when the first piston reciprocates in the first compression chamber, a gas outside the cylinder block is suctioned in, and the gas is compressed to generate a gas after first compression; the cylinder block is provided with a gas storage chamber for storing the gas after the first compression, and the gas storage chamber is connected to the first compression chamber; and the cylinder block is further provided with a second compression chamber that defines a space for the second piston to move up and down, the second compression chamber is connected to the gas storage chamber, and when the second piston reciprocates in the second compression chamber, the gas after the first compression is suctioned from the gas storage chamber, and the gas after the first compression is compressed to generate a gas after second compression; characterized in that: the gas storage chamber is disposed at the top of the cylinder block; and a positioning seat is provided in the first piston, the second piston is arranged on the positioning seat, the second piston is pushed by the positioning seat to move synchronously with the first piston to make the first piston and the second piston perform compression synchronously, and the gas storage chamber stores the gas after the first compression; and when the first piston is pulled from a top dead center to a bottom dead center, the second piston moves downward at a same time under an action of gravity to move from a top dead center to a bottom dead center, and the gas storage chamber provides the gas after the first compression to the second compression chamber. wherein the piston assembly comprises a first piston, a second piston arranged inside the first piston, and a movable assembly connected to the first piston, and the movable assembly is configured to drive the first piston and the second piston to reciprocate; the cylinder block is provided with a first compression chamber that defines a space for the first piston to move up and down, and when the first piston reciprocates in the first compression chamber, a gas outside the cylinder block is suctioned in, and the gas is compressed to generate a gas after first compression; the cylinder block is provided with a gas storage chamber for storing the gas after the first compression, and the gas storage chamber is connected to the first compression chamber; and the cylinder block is further provided with a second compression chamber that defines a space for the second piston to move up and down, the second compression chamber is connected to the gas storage chamber, and when the second piston reciprocates in the second compression chamber, the gas after the first compression is suctioned from the gas storage chamber, and the gas after the first compression is compressed to generate a gas after second compression; characterized in that: the gas storage chamber is disposed at the top of the cylinder block; and a positioning seat is provided in the first piston, the second piston is arranged on the positioning seat, the second piston is pushed by the positioning seat to move synchronously with the first piston to make the first piston and the second piston perform compression synchronously, and the gas storage chamber stores the gas after the first compression; and when the first piston is pulled from a top dead center to a bottom dead center, the second piston moves downward at a same time under an action of gravity to move from a top dead center to a bottom dead center, and the gas storage chamber provides the gas after the first compression to the second compression chamber. the gas storage chamber is disposed at the top of the cylinder block; and a positioning seat is provided in the first piston, the second piston is arranged on the positioning seat, the second piston is pushed by the positioning seat to move synchronously with the first piston to make the first piston and the second piston perform compression synchronously, and the gas storage chamber stores the gas after the first compression; and when the first piston is pulled from a top dead center to a bottom dead center, the second piston moves downward at a same time under an action of gravity to move from a top dead center to a bottom dead center, and the gas storage chamber provides the gas after the first compression to the second compression chamber.