Skip to content

not looping (for me) #11

Open
tcurdt opened this Issue Jul 21, 2011 · 1 comment

1 participant

@tcurdt
tcurdt commented Jul 21, 2011

...and I don't get why. I've used node-binary to do some chunk parsing on PNGs. While the code below works for the first chunk it just refuses to loop.

BINARY.stream(FS.createReadStream('some.png'))
  .skip(8)
  .loop(function(end,vars) {
    this
      .word32bu('len')
      .buffer('chunk', 4)
      .tap(function(vars) {
        this
          .buffer('data', vars.len)
          .skip(4)
          .tap(function(vars) {
            console.dir(vars);
          });
      });
  });

...and I don't get why. The data in the vars is all correct. It's also at the correct position. It just doesn't continue.
What's wrong with the above?

@tcurdt
tcurdt commented Jul 21, 2011

actually this issue might be related/the cause #10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.