Re: programmatically decompress lzw data
Re: programmatically decompress lzw data
- Subject: Re: programmatically decompress lzw data
- From: "Dennis C.De Mars" <email@hidden>
- Date: Thu, 4 Sep 2003 19:43:06 -0700
On Thursday, September 4, 2003, at 04:29 PM, Ben Dougall wrote:
>
thanks very much for your reply.
>
>
On Thursday, September 4, 2003, at 07:05 pm, Joe Zobkiw wrote:
>
>
>> what's the best / simplest way to decompress some data that has been
>
>> compressed using the lzw method using cocoa/obj-c code?
>
>
>
> You can always wrap the uncompress command-line application (see man
>
> uncompress) using NSTask/NSPipe as is commonly done. If you truly want
>
> source code within your application instead, you can find lots of
>
> sample source (in a variety of languages) for LZW by doing a Google
>
> search that will most likely compile with little trouble.
>
>
i would prefer internal code to an external system app / utility. i
>
was hoping code already existed and was accessible like with zlib but
>
it doesn't appear to be.
>
>
> It is my
>
> understanding that the patent for LZW expired this year but I'm not
>
> sure of any legal ramifications of using found source code unless you
>
> find some that is in the public domain, etc.
>
>
i *believe* (in other words i have no real idea) that that patent only
>
applies to compression, so if your code just decompresses you're not
>
effected by the patent (if it still exists or not), which is all i
>
want my code to do, so i probably will look into doing that.
>
>
I believe that your belief is wrong and that in fact both compression
and decompression are covered by patents (except in the U.S., but still
covered in other places for awhile: see below).
Here's some more information I gleaned with Google which might be of
general interest:
http://www.unisys.com/about__unisys/lzw
has the hard information on patent expiration. You still have to be a
little careful, since it is the U.S. Patent only that has expired.
There are separate patents in Canada, Japan and the U.K. and various
other European countries that all expire within a few days of each
other in the middle of 2004. (Late June - early July)
Open source code for LZW might be slightly hard to find since the
patent kind of discouraged the open source types, plus there are
technically better compression algorithms available. I would think that
there would be _something_ though. For instance, wouldn't the source
code distribution for Darwin contain the code for "compress"?
Finally, concerning the solution where you invoke "compress" as a
separate task from your application -- if you want your application to
be portable (to all OS X installations, that is) you might want to
check to make sure that compress is available when the user unchecks
"Install BSD subsystem" when installing OS X. I mean, I don't know what
gets installed and doesn't get installed in that case, but there are a
few people out there who don't install it.
- Dennis D.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.