Follow

linux, tar, compression, question 

If I specify a compression level of 9 and tar a directory full of images, are they going to be without *any* loss in quality when I unzip it back?

Β· Β· 6 Β· 2 Β· 0

linux, tar, compression, question 

@celia There will be no loss in quality. Lossy compression must know something about the data, to know what data can be reasonably thrown away. Since gz, bz2, etc (compression algos used with tar) are general purpose, they have to be lossless.

linux, tar, compression, question 

@robby Perfect! Thank you! You seem like you know your stuff. :)

linux, tar, compression, question 

@celia That's right: gzip is always lossless, no matter which compression level you choose πŸ˜€

linux, tar, compression, question 

@andya Woo! πŸŽ‰

Nice to see you around too. :)

linux, tar, compression, question 

@celia Awww thank you! 😊 I often see questions you ask that I know about, but go to answer and see like 20 replies already! Hope you're doing well?

linux, tar, compression, question 

@andya Oh no, I *wish* I was *that* popular. πŸ˜‚

I'm doing OK. Hope you are too!! :D

linux, tar, compression, question 

@celia I'm doing quite well, I think! I'm looking forward to your WordPressing of your website. I maintain WP for a friend's site and think I should rejuvinate mine with it too. If it ends up looking 10% as awesome as yours it would be oh so pretty 😍

linux, tar, compression, question 

@celia (sees your latest blog link, visits site... realises that he should have visited your site before going on about "future" WordPress plans) πŸ˜… oops!

linux, tar, compression, question 

@celia bare in mind compressing a tar full of already compressed data won't save you much, if anything, in terms of storage. Sometimes it makes sense just to leave it at tar.

linux, tar, compression, question 

@stardot Yes, I just about got 8% in savings if I'm doing the math right. πŸ€” Not much to speak of...

linux, tar, compression, question 

it did better than expected, must me a lot of meta data. Sometimes it's not worth the CPU cycles depending on what you're doing with it.

linux, tar, compression, question 

@celia yes. I think the compression switches only has an impact on speed

linux, tar, compression, question 

@celia Yes, you shouldnt have any loss.

linux, tar, compression, question 

@celia One thing to add to this thread: you can choose your compressor in tar, and xz generally makes things smaller than gzip. They're both lossless. Gzip is usually faster.

Sign in to participate in the conversation
Fosstodon

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.