|The stupid question is the question not asked|
Reading (and parsing) a byte streamby qbxk (Friar)
|on Mar 05, 2006 at 02:35 UTC||Need Help??|
qbxk has asked for the wisdom of the Perl Monks concerning the following question:
*Update - I found a solution and have posted the basic code which implements SmackFu's algorithm, written in pure perl, see the replys
I'm trying to read a stream of bytes, sent over http (yes), and read specific bytes out of it. I'm finding, incredulously, that I don't know how to determine the integer value of a byte. Some context:
I have a hunch ord($byte) is what i'm looking for, but the byte i'm reading isn't yielding the value I expect it to, which could be a different problem...
for the more curious, I'm attempting to implement an icecast stream recorder, the stream format is explained here: http://www.smackfu.com/stuff/programming/shoutcast.html
maybe somebody will recommend other solutions to reimplementing the wheel, which I'm open to, but my requirements are highly specific and I haven't found anything that can meet them all, so here we are.
It's not what you look like, when you're doin' what you’re doin'.
It's what you’re doin' when you’re doin' what you look like you’re doin'!
- Charles Wright & the Watts 103rd Street Rhythm Band