I need to read some number of Binary files.
Each file is "mapped" by a very nice SQL Server table:
Since there are many types of files, I'm thinking of reading
byte-by-byte until end-or-record converting to a binary STRING
as I go. Where's a nice "C" Union declaration when you need it!?
I think a STRING will let me "peel off" sub-integers that are contained
inside a LONG.
Then, as I traverse each field, pull off the correct number of bits
and submit to a conversion algorithm.
The problem is, now I need algorithms for each datatype. Help!
Characters & integers are easy, but floating point?
Am doing research now, if anyone has any ideas, I'd be happy to
hear them.
Wayne
Each file is "mapped" by a very nice SQL Server table:
Code:
Field1 Long
Field2 Char(8)
Field3 Float
Field4 Bit(3)
Field5 Bit(8)
Field6 Bit(5)
Since there are many types of files, I'm thinking of reading
byte-by-byte until end-or-record converting to a binary STRING
as I go. Where's a nice "C" Union declaration when you need it!?
I think a STRING will let me "peel off" sub-integers that are contained
inside a LONG.
Then, as I traverse each field, pull off the correct number of bits
and submit to a conversion algorithm.
The problem is, now I need algorithms for each datatype. Help!
Characters & integers are easy, but floating point?
Am doing research now, if anyone has any ideas, I'd be happy to
hear them.
Wayne