• 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: David Chan <email@hidden>
  • Date: Mon, 23 Jan 2006 16:00:19 +0800

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

  • Follow-Ups:
    • Re: How to decompress file
      • From: "John C. Randolph" <email@hidden>
References: 
 >How to decompress file (From: David Chan <email@hidden>)
 >Re: How to decompress file (From: Uli Kusterer <email@hidden>)

  • Prev by Date: NSSound vs QuickTime
  • Next by Date: Re: Incompatible pointer type from NSManagedObject's validateValue:forKey:error method
  • Previous by thread: Re: How to decompress file
  • Next by thread: Re: How to decompress file
  • Index(es):
    • Date
    • Thread