Click here to Skip to main content
15,898,035 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I firoj bijali. I want to know how LZW algorithm is used to compress and decompress image file(.jpg or gif). Please help me.
Posted
Comments
Sergey Alexandrovich Kryukov 30-Apr-15 2:59am    
Why?
—SA

1 solution

It makes no sense at all. Both types of files are already compressed. Amazingly, GIF is compressed using the same very LZW algorithm: http://en.wikipedia.org/wiki/GIF[^].

JPEG uses lossy compression algorithm, with loss of quality (which depends on parameters), so its compression factors are higher. Therefore, LZH compression will barely compress it. Please see: http://en.wikipedia.org/wiki/JPEG[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900