Correction / edit on btrfs compression article?

makes a good point. It’s confusing to compare the transparent compression to lossy image compression, since there are losses. Can we refine this?

1 Like

@mattdm I’m the author, and I’ve seen this complaint as well. I think I generalized too far in trying to make it easier to understand. It was intended as simile, but I don’t think I made that clear enough. I would be willing to add a note or revoke the change entirely, but I do not have the required permissions to do so… Perhaps an editor could swoop in?

1 Like

We can amend that article. Do you have some text you would like to replace?

2 Likes

Maybe actually change to PNG vs JPEG?

1 Like

Transparent compression makes a file smaller, but the final version is virtually indistinguishable from the original by the human viewer. If you have ever worked with Audio or Video, you have probably heard of the terms “lossless” and “lossy”. Think of transparent compression like a lossy compressed video file. (NOTE: Transparent compression does not use a lossy compression algorithm. It uses the lossless algorithm zstd. This is simply a high level generalization to help give a better understanding of the concept.) You want the video to look essentially like the original. Small enough to be streamed over the web. Not so compressed that a human can distinguish it from the original file. Transparent compression works similarly. Your file system will look and behave the same way as before (no ZIP files everywhere, no major speed reductions). Everything will look, feel, and behave the same. However, in the background it is taking up much less disk space.

We could also change it entirely, but that may take some more thinking. I truly am sorry for any inconvenience I have caused to the readers.

1 Like

This may make sense:

Transparent compression makes a file smaller, but the final version is virtually indistinguishable from the original by the human viewer. If you have ever worked with Audio, Video, or Photography, you have probably heard of the terms “lossless” and “lossy”. Think of transparent compression like a lossless compressed PNG file. You want the image to look exactly like the original. Small enough to be streamed over the web. Not so compressed that a human can distinguish it from the original file. Transparent compression works similarly. Your file system will look and behave the same way as before (no ZIP files everywhere, no major speed reductions). Everything will look, feel, and behave the same. However, in the background it is taking up much less disk space.

I slightly prefer the former, but I think both metaphors are effective.

I’ve made that update. (the second one)

Question: Do you stil want to say “Not so compressed that a human can distinguish it from the original file.” ? The data that is recovered verbatim. This may imply to some that it may not ?

To veer on the edge of safety I would say discard that.

1 Like

Done. Read it over and if you want to replace any or all of that paragraph we can do it.

Awesome – thanks for the quick response here!

1 Like

Could I also leave a comment to clear the air for anyone confused before:

Note: There was initially some confusion about a simile used in this article. I apologize for not making things clearer, and have changed the article to better reflect what I initially intended. BTRFS transparent compression does not use a lossy compression algorithm. It uses the lossless algorithm zstd. What was intended as a high-level generalization was taken literally due to a lack of clarification on my part.

1 Like

I don’t think there would be problem with that. You should be able to leave that comment.

1 Like

Transparent compression is complex, but at its core it is simple to understand: it makes files take up less space. It is somewhat like a tar or ZIP file. Transparent compression will dynamically optimize your file system’s bits and bytes into a smaller, reversible format. This has many benefits that will be discussed in more depth later on, however, at its core, it makes files smaller. This may leave most computer users with a question: “I can’t just read ZIP files. You need to decompress them. Am I going to need to constantly decompress things when I access them?”. That is where the “transparent” part of this whole concept comes in.

I thought inferences could be made but could you change “tar [file]” to “compressed tar [file]”? Thanks!

Done. I guess I was on your wave length with the simile and the tar reference. I’ll have to be more critical and step out of my shoes in the future.

1 Like

Transparent compression makes a file smaller, but the final version is indistinguishable from the original by the human viewer. If you have ever worked with Audio, Video, or Photography you have probably heard of the terms “lossless” and “lossy”. Think of transparent compression like a lossless compressed PNG file. You want the image to look exactly like the original. Small enough to be streamed over the web, but still readable by a human. Transparent compression works similarly. Your file system will look and behave the same way as before (no ZIP files everywhere, no major speed reductions). Everything will look, feel, and behave the same. However, in the background it is taking up much less disk space. This is because BTRFS will dynamically compress and decompress your files for you. It’s “Transparent” because even with all of this going on, you won’t notice the difference!

I think this will bring the best amount of clarification, and fix some previous errors. I once again apologize sincerely.

@rlengland

1 Like

Changes in place. Hopefully that will help. I’ll be away for a while but if someone else causes the need for more clarification let me know here and we’ll deal with it.

1 Like

No lasting harm done, I think. :slight_smile: Thanks for the article!

Explaining such a complex topic in simpler terms was difficult from the start, and I’m glad we got this fixed quickly. I have definitely learned from this, and hope to write more for the magazine in the future. Thanks for all the help!

2 Likes

You are very welcome. Thanks for contributing. We’ll look forward to your next article.

2 Likes