Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Optimizing binary file parser (pack/unpack)

by Marshall (Canon)
on Oct 03, 2017 at 21:54 UTC ( [id://1200628]=note: print w/replies, xml ) Need Help??


in reply to Optimizing binary file parser (pack/unpack)

It would be helpful if you gave more specs about this file.

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).

  • Comment on Re: Optimizing binary file parser (pack/unpack)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1200628]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2024-04-19 12:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found