• 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: Markus Hitter <email@hidden>
  • Date: Thu, 19 Jan 2006 21:50:43 +0100


Am 19.01.2006 um 08:31 schrieb David Chan:

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?

First, you can use Carbon in Cocoa as well. Having a few Carbon calls inside a Cocoa method won't disturb you app's design.


Second, something like popen("gzip -cd myfile"); would avoid to load the compressed file into memory. Big win if you read big files. Even necessary for files beyond 1 GB (compressed & uncompressed size > 2 GB).


Markus

- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.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
References: 
 >How to decompress file (From: David Chan <email@hidden>)

  • Prev by Date: Re: does NSMenuItem setMixedStateImage or setOnStateImage work?
  • Next by Date: Re: initial column of NSTableView sorted
  • Previous by thread: Re: How to decompress file
  • Next by thread: Re: How to decompress file
  • Index(es):
    • Date
    • Thread