Even though we ARE Nikon lovers,we are NOT affiliated with Nikon Corp. in any way.

English German French

Sign up Login
Home Forums Articles Galleries Recent Photos Contest Help Search News Workshops Shop Upgrade Membership Recommended
members
All members Wiki Contests Vouchers Apps Newsletter THE NIKONIAN™ Magazines Podcasts Fundraising

lossless vs. uncompressed - what are you doing?

sevtcard

US
332 posts

Click to send email to this author Click to send private message to this author

"RE: lossless vs. uncompressed - what are you doing?"

sevtcard Silver Member Nikonian since 05th Mar 2009
Wed 18-Sep-13 05:49 PM | edited Wed 18-Sep-13 06:04 PM by sevtcard

That is a good question....i don't know what their motivation is (maybe processing time?), but 'lossless' is not a claim, it is a well known computer algorithm. Here is a post from MotoMannequin, from May 8th, 2012, which explains the process nicely:

"....PSA: Uncompressed NEF is for those of the mindsent who would try to comare image quality of 2 different brand CF cards (yes these people exist). There actually is a free lunch with lossless compression - the result is exactly the same data as the uncompressed file, just as when you ZIP then unZIP a file, the unzipped one is the same as the original. Therefore, always take advantage of lossless compression.

Lossless compression takes advantage of repeating patterns in data. The simplest and most easy to understand is run-length encoding (RLE). Imagine I'm trying to compress a B&W image, using "B" for a black pixel and "W" for a white pixel. I have a row that looks like this:

WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWBWWWWWWWWWWWWWW

I could encode this data like this:

12W1B12W3B24W1B14W

...meaning 12 Ws, followed by 1 B, followed by 12 Ws, etc. This compressed 67 bytes down to 18 without any loss of data. I can fully recover the original string from the data in the compressed string.
Of course, some data doesnt' compress down so well. The string:

BBWWBBWWBBWW

Compresses to:

2B2W2B2W2B2W

Which is the same length of the original. Data compression algorithms talk about the amount of "entropy" in the data which involves the amount of repeating patterns and how far the data can be compressed. When you try to zip a jpeg you will find it doesn't compress much at all. Even though jpeg runs a different compression algorithm than zip, once the data is compressed is has very low entropy, and zip can't find much to compress. What ZIP does is greatly more clever and complicated than RLE, but you get the idea.

Lossless means you can 100% recover the original data. The only theoretical downside would be additional processing time to do the compression, but it turns out that writing the bytes to flash takes longer than compressing them, so you have a net gain in processing time when using losless.

I guess the other possible downside is that a single byte corrupted in a compressed file might render the entire file unusable, while a corrupted byte in an uncompressed file might only corrupt one pixel. In pracitce, this is a vanishingly rare issue, and one I'm personally not concerned about.

Larry - a Bay Area Nikonian"

Thanks to Larry for the above.

Mark
www.broadwallphotography.com

This is a hot, active topic! lossless vs. uncompressed - what are you doing? [View all] , sevtcard Silver Member , Sun 15-Sep-13 06:32 PM
Subject
ID
Reply message RE: lossless vs. uncompressed - what are you doing?
1
Reply message RE: lossless vs. uncompressed - what are you doing?
2
Reply message RE: lossless vs. uncompressed - what are you doing?
4
Reply message RE: lossless vs. uncompressed - what are you doing?
7
Reply message RE: lossless vs. uncompressed - what are you doing?
9
     Reply message RE: lossless vs. uncompressed - what are you doing?
21
Reply message RE: lossless vs. uncompressed - what are you doing?
8
Reply message RE: lossless vs. uncompressed - what are you doing?
11
Reply message RE: lossless vs. uncompressed - what are you doing?
3
Reply message RE: lossless vs. uncompressed - what are you doing?
5
Reply message RE: lossless vs. uncompressed - what are you doing?
6
     Reply message RE: lossless vs. uncompressed - what are you doing?
10
          Reply message sRE: lossless vs. uncompressed - what are you doing?
13
          Reply message RE: lossless vs. uncompressed - what are you doing?
22
          Reply message RE: lossless vs. uncompressed - what are you doing?
24
          Reply message RE: lossless vs. uncompressed - what are you doing?
25
          Reply message RE: lossless vs. uncompressed - what are you doing?
30
          Reply message RE: lossless vs. uncompressed - what are you doing?
23
Reply message RE: lossless vs. uncompressed - what are you doing?
12
Reply message RE: lossless vs. uncompressed - what are you doing?
14
     Reply message RE: lossless vs. uncompressed - what are you doing?
15
     Reply message RE: lossless vs. uncompressed - what are you doing?
16
     Reply message RE: lossless vs. uncompressed - what are you doing?
17
     Reply message RE: lossless vs. uncompressed - what are you doing?
34
     Reply message RE: lossless vs. uncompressed - what are you doing?
18
     Reply message RE: lossless vs. uncompressed - what are you doing?
19
          Reply message RE: lossless vs. uncompressed - what are you doing?
20
               Reply message RE: lossless vs. uncompressed - what are you doing?
26
                    Reply message RE: lossless vs. uncompressed - what are you doing?
27
                         Reply message RE: lossless vs. uncompressed - what are you doing?
28
                              Reply message RE: lossless vs. uncompressed - what are you doing?
29
Reply message RE: lossless vs. uncompressed - what are you doing?
31
Reply message RE: lossless vs. uncompressed - what are you doing?
32
Reply message RE: lossless vs. uncompressed - what are you doing?
33
Reply message RE: lossless vs. uncompressed - what are you doing?
35