bagyi has asked for the wisdom of the Perl Monks concerning the following question:
Hi monks, I would like to seek advice on how to deal with parsing binary data file.
The binary file contains variable length records. (tag-length-value) Some variable-length-records are optional and appear at the end of a record. In that case, the optional field (length) itself is not in record. e.g
Variable string is length encoded string. length follow by content. How do I use unpack in this case? Since I need to know how many bytes are consumed by unpacking of required fields?integer,character,variable string,optional variable string
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perl pack/unpack optional variable length data
by Anonymous Monk on Dec 18, 2015 at 08:24 UTC | |
|
Re: perl pack/unpack optional variable length data
by Anonymous Monk on Dec 18, 2015 at 08:28 UTC |