Ghostscript is a decades-old open-source interpreter for PostScript and PDF. It renders PDF pages to images, converts between formats, applies compression, and enforces PDF/A structure. Most "PDF engine" claims in software — including many commercial tools — end up calling Ghostscript or reimplementing parts of it.
For compression, its power is selective reprocessing: resampling only the images inside a PDF while leaving vector text untouched, downsampling at controlled quality steps. That is why a Ghostscript-backed compressor can hit aggressive size targets without visibly damaging text.
Running Ghostscript server-side (as PdfPixels does for heavy operations) keeps the browser light for everyday tasks while reserving the heavy interpreter for jobs that need it.