Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Handling Hex data with Dynamic unpack

by Anonymous Monk
on Jul 05, 2012 at 09:59 UTC ( [id://980006]=note: print w/replies, xml ) Need Help??


in reply to Handling Hex data with Dynamic unpack

No doubt, I can decode the binary file this way.

I don't know many binary files represented as hex-text, so that won't work

Also, the format specification doesn't specify endianess so the format spec seems incomplete

I dont want to code with C kind of logic

:) But but but but, aren't you dealing with C-kind of data? Maybe Convert::Binary::C can help?

  • Comment on Re: Handling Hex data with Dynamic unpack

Replies are listed 'Best First'.
Re^2: Handling Hex data with Dynamic unpack
by PerlJedi (Novice) on Jul 05, 2012 at 10:11 UTC

    It is a BCD encoded binay file which is read in binary() mode.

    It follows a Big Endian notation.

    By C kind of logic, I meant the usual way of using loops etc.

      You might find the Template Grouping section of perlpacktut interesting, though I think writing some loops would be easier.

        Yes ... I did look through it and came up with some basic code ... but offcourse, I need to come up with complete code and then ask for other ways to handle the solution.

        Thanks ig :) for your reply.

      It is a BCD encoded binay file which is read in binary() mode.

      What does that mean?

      By C kind of logic, I meant the usual way of using loops etc.

      I think first you have to write some loops :)

        Sorry for the abbreviations.

        BER - http://en.wikipedia.org/wiki/Basic_Encoding_Rules

        DER - http://en.wikipedia.org/wiki/Distinguished_Encoding_Rules

        Its mainly the Telecom industry used standards

        Well, it is not following any of those BER or DER encoded binary file. Its just a plain binary file.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-25 06:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found