33

Example: I have a book which I wanna archive. Would sending a zip with the pages take less storage than sending the, let's say, 10 individual pages sparatedly?

you are viewing a single comment's thread
view the rest of the comments
[-] scott@lem.free.as 11 points 6 days ago* (last edited 6 days ago)

I'm not quite sure what you're asking.

ZIP, by default, is a compression tool. It takes multiple files, creates an index of the files within and then performs compression on all the files combined (to allow for a better dictionary). The index and dictionary are "overhead" that exists for each ZIP file.

Sending multiple files, uncompressed, or sending multiple ZIP files (one for each file) will almost certainly be less efficient.

[-] helvetpuli@sopuli.xyz 1 points 5 days ago

OP's choice of the word "heavier" is interesting because you could argue that the information density of a compressed file is greater than that of an uncompressed one.

Of course that's abusing the metaphor a bit.

OP: maybe try larger and smaller next time.

[-] Jimmycrackcrack@lemmy.ml 1 points 5 days ago

It's an interesting question though because I guess if the files being zipped are already nearly or maximally compressed then I'd assume that the zip of all those files actually was in some extremely tiny negligible way, actually slightly larger than those files on their own.

[-] MeowerMisfit817@lemmy.world 1 points 6 days ago

Example: Book A I have all 10 pages of it in a jpg each.

Let's say the size of all these 10 pages togheter is 300MB (not tech savy, don't know if this is realistic).

If I put them on a zip, will the size be smaller? Like, reduce to 250MB or something?

[-] klangcola@reddthat.com 5 points 6 days ago

For jpg's, no they will not get smaller. Maybe even a smidge bigger if you zip them. Usually not enough to make a practical difference.

Zip does generic lossless compression, meaning it can be extracted for a bit-perfect copy of the original. Very simplified it works by finding patterns repeating and replacing a long pattern with a short key, and storing an index to replace the keys with the original pattern on extraction.

Jpg's use lossy compression, meaning some detail is lost and can never be reproduced. Jpg is highly optimized to only drop details that don't matter much for human perception of the image.

Since jpg is already compressed, there will not be any repeating patterns (duplicate information) for the zip algorithm to find.

[-] slazer2au@lemmy.world 6 points 6 days ago

For images it may be better but images are already compressed so there may not be a large saving in zipping them.

Alternative options would be to use more storage efficient formats like webp for instance.

this post was submitted on 04 Dec 2025
33 points (100.0% liked)

Asklemmy

51592 readers
315 users here now

A loosely moderated place to ask open-ended questions

Search asklemmy ๐Ÿ”

If your post meets the following criteria, it's welcome here!

  1. Open-ended question
  2. Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
  3. Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
  4. Not ad nauseam inducing: please make sure it is a question that would be new to most members
  5. An actual topic of discussion

Looking for support?

Looking for a community?

~Icon~ ~by~ ~@Double_A@discuss.tchncs.de~

founded 6 years ago
MODERATORS