Eli5. How does a PDF compressor work? How does it give the same quality, with lower size?

613 views

I compressed a PDF file that was around 95 MB, and the online compressor compressed it to only 1.15 MB, but when I viewed the file it still has a great, almost exact same quality.

In: Technology

5 Answers

Anonymous 0 Comments

The word file means a folder for something.

A PDF file is a folder for stuff..

One of those stuff is the document – the collection of images, words that you read on the screen.

There are usually other stuff, such as notes uncle Bob (bob.exe) left when he made some changes. Do you remember Aunt Mary? She talked quite a lot and wasn’t good at documenting things so she always added extra details than necessary. Whenever someone makes changes, a little bit of extra stuff gets added.

A PDF compressor comes in and says yo guys, we don’t need uncle bob or mary to be in this shit anymore. It’s been a long time, let’s remove that stuff but leave the main images and words intact! Those are important.

Anonymous 0 Comments

PDF are technically not “an image”, but rather text, special text, “code”. A lot of that can be considered “clutter”, often left behind for redundancy or for being inefficient. Compressors usually de-clutter the file, then applies actual compression (which Tom Scott made an excellent video about on youtube, I recommend checking it out.)

In short: Trims the excess useless fat, then applies regular compression.

Anonymous 0 Comments

ELI5:

When you make a collage of letters and words and images on a page of paper with some items on top of others, there can be a lot of messy mistakes and cuts and pieces of tape hanging out.

If you put the collage on a photocopier, you get a nice clean picture of the collage, no folds or creases or tears or tape sticking out.

Slightly more complex, but slightly more accurate, because I don’t think OP is actually 5:

“Recompressing” a PDF is similar – it can discard items that are duplicated or not used anymore. It can also use other compression methods to reduce the size of an image inside a PDF, or lossless compression methods to squeeze the size of text.

Anonymous 0 Comments

Something not mentioned already is that PDFs are commonly created with images that are massively too large for the need.

Imagine if you have a photograph suitable for printing a roadside billboard, but you’re showing it on a cellphone display. You can either keep the whole image and scale it down in realtime to display it, or replace the original image with a smaller one already sized to the cellphone screen size. It physically looks the same on the screen either way, but the latter is vastly smaller.

Anonymous 0 Comments

Owhhh, damn, that explains it, thanks mann