Re: How to decompress file
Re: How to decompress file
- Subject: Re: How to decompress file
- From: Uli Kusterer <email@hidden>
- Date: Fri, 20 Jan 2006 13:48:00 +0100
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