• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to decompress file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: How to decompress file
      • From: David Chan <email@hidden>
References: 
 >How to decompress file (From: David Chan <email@hidden>)

  • Prev by Date: Re: NSBundle path functions don't work after moving .app ?
  • Next by Date: Re: cocoa interact with finder
  • Previous by thread: Re: How to decompress file
  • Next by thread: Re: How to decompress file
  • Index(es):
    • Date
    • Thread