Skip to content

cork/uncork in the encoder #2

@jfromaniello

Description

@jfromaniello

in my code I have something like this:

something.pipe(lps.encode()).pipe(socket);

I think it will make sense to cork/uncork the target stream for the two pushes or push a concat'ed buffer:

  this.push(pool.slice(used - varint.encode.bytes, used))
  this.push(data)

Similar issue in another similar library:

davedoesdev/frame-stream#4

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