Skip to content

How to pass state from first read? #64

Description

@gmaclennan

I can't believe I am just coming across this now, this is all excellent stuff.

How would I use pull streams when I need information from the first few bytes of the source stream for processing in the rest of the stream?

I am dealing with some streams2 image streams, which fire a 'format' event after the header has been read and we know width and height. From there I want to use pull streams, but I'm not sure how. For example, I would like to use pull-block to pull one row of pixels at a time, but I need to know the image width first.

Sorry, just getting my head around all this, and my head is still tangled, perhaps too much so, from understanding streams2.

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions