• 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: compressing an NSString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compressing an NSString


  • Subject: Re: compressing an NSString
  • From: Ondra Cada <email@hidden>
  • Date: Sat, 13 May 2006 19:10:56 +0200

Stephen,

On 13.5.2006, at 18:41, stephen rouse wrote:

I'm working on a cocoa app in which i'd like to compress a chunk of xml (stored in an instance of NSString) before sending it over the wire. Is there a recommended way to accomplish this?
I notice that zlib is installed as part of panther, so was thinking that a category on NSString that made use of zlib would be a decent approach, so i could call a method like stringByCompressingString:options: or something similar.


I've never done this sort of thing before, so i thought i would check here to see if:
a. this approach was wrong-headed.
b. something like this already exists somewhere.

Myself, I would launch bzip and pipe the data through it. YMMV, of course.


Anyroad, if you are about to write this, I guess you want rather compress NSData than NSStrings (adding perhaps just a convenience NSString category which would convert self to NSData and then use the compression).
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc



_______________________________________________ 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: compressing an NSString
      • From: "Adam R. Maxwell" <email@hidden>
References: 
 >Using CLI arguments in controller (scoping?) (From: Andrew Pouliot <email@hidden>)
 >compressing an NSString (From: stephen rouse <email@hidden>)

  • Prev by Date: Re: Rotating Image Button
  • Next by Date: Re: Color of the slider thumb NSSlider
  • Previous by thread: compressing an NSString
  • Next by thread: Re: compressing an NSString
  • Index(es):
    • Date
    • Thread