Reading a binary file format?
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