they are the same thing,

a compressor makes the quite sounds louder. Hence when you play a note, it won't fade away as quickly as normal. Hence it being helpfull for the sustain of your notes
They are KIND OF the same thing. What they do is that they make your notes ring out longer. giving you more sustain. The thing that separates them is that the compressor is built to make all your notes sound at the same volume. If you play very hard it sets a gate and thereby lowering the volume and if you do the opposite, play soft it will put more volume to it... Basicly it kills your dynamics :P
Schecter C1 Classic
Fender Vintage -57 Ri Stratocaster
Fender Blues JR w/ 12"Cannabis Rex
Mad Professor Sky Blue OD
Wampler Ego Compressor
TC Electronics Stereo Chorus/Flanger