Re: How to decompress file
Re: How to decompress file
- Subject: Re: How to decompress file
- From: "John C. Randolph" <email@hidden>
- Date: Mon, 23 Jan 2006 06:20:19 -0800
There are several implementations of NSData/NSMutableData categories
for zlib compression around on the net.
-jcr
On Jan 23, 2006, at 12:00 AM, David Chan wrote:
Yup the previous application was using Power Plant X. The
DecompressionStream was using zlib to decompress the file. I wanted to
use NSData instead of datafork for my cocoa application but I couldn't
exactly find a way of using zlib to decompress NSData.
On 1/20/06, Uli Kusterer <email@hidden> wrote:
Am 19.01.2006 um 08:31 schrieb David Chan:
I am currently given task to rewrite a carbon project (c++) using
cocoa (obj-c)
Are you using any framework for some of your work?
The legacy application I am working with is used to read a special
type of compressed file. At the moment the carbon applicaiton use
datafork to read the data and CDecompressionStream to decompress the
data.
Is CDecompressionStream one of your classes? It's not Carbon or
Classic Mac Toolbox. It sounds more like a PowerPlant class. Is the
original using Metrowerks' PowerPlant? PowerPlant X?
How do you do that in cocoa? How do you decompress an NSData of a
compressed file?
You can just get the NSData's -bytes accessor to get a pointer to
the raw data. Then build an uncompressed version into an
NSMutableData.
You can also directly work with the files in Cocoa (see
NSFileHandle), but the compression code you have to provide yourself.
Shouldn't be hard to port that over, though.
Cheers,
-- M. Uli Kusterer
http://www.zathras.de
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden