Question: how to calculate lzw compression ratio?
Answer: Answers (1) Look at the size of the file on disk and divide the number of bytes the image variable has in your MATLAB program by that number. For example, the disk file is 200,000 bytes, and the size in MATLAB is 1,000,000 bytes. 1,000,000/200,000 = 5 so the compression ratio is 5 to 1.