How can I do LZW decoding in Java?

前提是你 提交于 2019-11-29 07:20:02
Stephen C

Here are a couple of links:

And there are others.

Indeed if the images are LZW compressed TIFF files, The Java Advanced Imaging API apparently supports decoding directly (though not encoding it seems).

I know the question is old, but I just wanted to add a great resource about LZW:

http://www.matthewflickinger.com/lab/whatsinagif/lzw_image_data.asp

It's more specifically about the use of LZW in GIF images, but it explains the compression and decompression algorithms pretty well.

You can also try with 7-Zip JBinding which uses the 7zip library internally. It's quite easy to use.

I went through a surprising amount of LZW implementations before finding one that worked for my case.

UncompressedInputStream from the BioJava project worked for me, when I needed to unpack a .pax file.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!