in reply to binary to piddle
So, to get those values (untested):
Does that work with your test data?$ver = unpack("n", substr($buf,0,2)); #or s signed 16 bit $extension = unpack("l", substr($buf,6,4)); # signed 32 bit int
I've never tried to convert an IEEE network order float. There may be some issues here, but since you have an independent way of verifying the correctness of the conversion, I would just try converting a few and see if there is a problem or not.
I guess the question is whether our not you can "get to first base" now?
|
|---|