• 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
Reading a binary file format?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Reading a binary file format?


  • Subject: Reading a binary file format?
  • From: Keith Blount <email@hidden>
  • Date: Thu, 11 Oct 2007 16:15:38 -0700 (PDT)

Hi,

I need to read what I assume is a binary file into my
program. I know where to expect the various parts of
the file, I'm just not sure how to read them in -
probably because I'm self-taught at Cocoa (Kochan &
Hillegass) and it requires a lower level of C, I'm not
sure.

So, suppose you have a file that contains some text
but also some (presumably binary) integer information.
If you open it up in TextEdit, you can see the text,
but there are some invisible characters that must be
the binary information that is unrecognised by
TextEdit. How would you go about reading it into a
Cocoa program? For instance, say the file has the
integers 'SCLT'  and 0 as part of its header, and some
integers after it, and then 'PLST', and then some
integers and then bytes representing text data. In
TextEdit, you would see "SCLT PLST" followed by the
text. How would I go about reading all of the
information and accessing the integers hidden away in
there etc? Can I do this with NSData or NSString
methods, or do I need to delve deeper into C?

I hope that is not too vague a question - I have a
file format I need to read (but it is private so I
can't post it) but don't quite know where to begin.

Many thanks and all the best,
Keith


      ____________________________________________________________________________________
Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Reading a binary file format?
      • From: Douglas Davidson <email@hidden>
  • Prev by Date: Re: Setting a shadow in -willDisplayCell causes CGContextSetStyle error?
  • Next by Date: Re: Getting a NSMenuItem to respond to two different key equivalents
  • Previous by thread: Re: Setting a shadow in -willDisplayCell causes CGContextSetStyle error?
  • Next by thread: Re: Reading a binary file format?
  • Index(es):
    • Date
    • Thread