Skip to content

Take a parsed value for computing not for parsing #74

Open

Description

@mok-liee

Hello binary-parser Team,

thanks for binary-parser. I found it last week and it is the simplest and best binary parser i've seen.

I have a question or feature request. Is it possible to use a parsed value only for computing in a next section ob a binary block?

Parser.start()
  .string('length', {encoding: 'ascii', length: 2, formatter: str2int})
  .skip(23)
  .array('position', {
    type: 'int32be',
    length: "length"
  });

Here u can see i want to parse the length to find the length for my array. But i dont want the value 'length' in my parsed output.

Is this possible?

Activity

  1. jardicc commented on Feb 23, 2018

    @jardicc

    I have the same question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions