in reply to Optimizing binary file parser (pack/unpack)
The last time I worked with a binary file in Perl, it was to concatenate some .WAV files together. The .WAV has a header and then some number of binary bytes of data. The number of data bytes are specified in the header info. It was not necessary for me to unpack all of the data, just parts of the binary read in the header which were relevant to the size of the data that followed amoungst other params. I selected the key parts of the binary header via substr to get a ranges of bytes and used pack/unpack upon them.
I think BrowserUk is on the right track here Re: Optimizing binary file parser (pack/unpack).
|
|---|