Re: programmatically decompress lzw data
Re: programmatically decompress lzw data
- Subject: Re: programmatically decompress lzw data
- From: Joe Zobkiw <email@hidden>
- Date: Thu, 4 Sep 2003 21:13:25 -0400
On Thursday, September 4, 2003, at 07:29 PM, Ben Dougall 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.
thanks very much for your reply.
You're welcome.
this is probably very silly: would there any way to pretend that your
data is a tiff and get the tiff methods to decompress it? i've never
used those functions but while searching cocoa's documentation for lzw
NSTIFFCompression and NSBitmapImageRep came up.. ? probably best to
forget that. just hoping to find something that's already in code /
cocoa though.
Interesting idea...may be worth some experimentation as a hack but I
wouldn't count on it. I would just find some code and use that instead.
However, note that the user will not be able to "tell" you are calling
a script to perform the task using NSTask/NSPipe if you go that route -
unless you really NEED the code for some reason - consider doing it
this way - it isn't "cheating" - just another way to perform the task.
Take care,
<joe>
_______________________________________________
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.