Re: pack it in
| From: | Jochem Maas | Date: | Fri, 25 Jan 2008 00:13:53 +0000 |
| Subject: | Re: pack it in | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-268059@lists.php.net to get a copy of this message | ||
Richard Lynch schreef:
On Thu, January 24, 2008 5:20 pm, Jochem Maas wrote:ok. that's where my brain goes to mush - all strings in php (for now) are binary ... what's the difference between the binary strings in php and such found in these 'binary files' that they need to be packed/unpacked? sorry if I'm sounding retarded ... I probably am :-/someone asked about checksum values in another thread, I believe he got his answer no thanks to me. but whilst I was trying to help I got stuck playing with pack/unpack. so now I have the broadbrush question of what would one use pack/unpack for? can anyone point at some realworld examples/code that might help me broaden my horizons?Reading a "binary" file with various bytes/bits that need to get converted to integers for you to do something useful with them.
Ditty for writing said file.