• 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: "John C. Randolph" <email@hidden>
  • Date: Wed, 18 Jan 2006 23:55:19 -0800


On Jan 18, 2006, at 11:31 PM, David Chan wrote:

Hi all,

I am currently given task to rewrite a carbon project (c++) using cocoa (obj-c)
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.
How do you do that in cocoa? How do you decompress an NSData of a
compressed file?
Thanks a lot.


You can get a pointer to the bytes in the NSData object by sending it a -bytes message, or you can copy them into a buffer using - getBytes:. Then, just pass that buffer to whatever routine you're using to decompress.

-jcr

John C. Randolph <email@hidden> (408) 914-0013
Roaming Cocoa Engineer,
Available for your projects at great Expense and Inconvenience.



_______________________________________________
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


References: 
 >How to decompress file (From: David Chan <email@hidden>)

  • Prev by Date: Re: does NSMenuItem setMixedStateImage or setOnStateImage work?
  • Next by Date: Re: "Open dialogue"-like file system browser
  • Previous by thread: How to decompress file
  • Next by thread: Re: How to decompress file
  • Index(es):
    • Date
    • Thread