in reply to Re^2: Iteratively unpack structure from binary file ( ReadBytes, ReadFloat, ReadInt32 )
in thread Iteratively unpack structure from binary file
That's a lot of calls to read and unpack. It would be far faster to process at least record at a time, if possible.
Yup, but I like the memorable-self-documenting-english-worded-ness of the api ...
The OP can always streamline his API once he gets things working the way he wants
By the way, you forgot to specify endianness for the floating-point types.
Its deliberate as per the comments copied from pack docs , pack has more about it ... float/double are very very platform specific even if you specify endianess
I can't guess how it gets twisted across platforms so I leave it as is
perlpacktut recommends Convert::Binary::C :) I find "my api" (similar to what I saw in javascript/java/c#sharp ...) easier
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Iteratively unpack structure from binary file ( ReadBytes, ReadFloat, ReadInt32 )
by ikegami (Patriarch) on Oct 22, 2014 at 03:22 UTC | |
by Anonymous Monk on Oct 22, 2014 at 06:32 UTC |