Git Product home page Git Product logo

node-zstreams's People

Contributors

crispyconductor avatar crowelch avatar kb185186 avatar oppenlander avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

node-zstreams's Issues

Request stream

Add an easy interface to create a correctly behaving stream from request()

Add JSON streams

Need the following JSON streams:

  • JSONStringifyStream - Generate (configurable) either delimiter-separated JSON blobs or a continuous single JSON array from a stream of objects
  • JSONParseStream - Streaming JSON generation

Similar things have been implemented by other existing projects; it may be possible to use those and just wrap them in zstreams.

Grunt Build

We should add a grunt file for running tests and the linter at the same time.

We will also want it in the future for Browserify/Bower builds.

Add ResumingRequestStream

Add a stream that will retry RequestStream connections on error and utilize the Range header to only pull data that still needs to be pulled.

Make FunctionStream conform to readable spec

Readables are supposed to continue emitting data as long as .push() returns true and it has data to emit. FunctionStream's current implementation will result in unnecessary delays and pauses. It needs to repeatedly call the generator function until push() returns false. There should also be checks added for if _read() is called while a generator function is already running.

Add promise support to helper functions

This will be a breaking change. Make helpers like .through() synchronous by default, unless they return a Promise . Add variants like throughAsync() for the callback-style interface.

HighWaterMark Not Being Set on Duplex

On Duplex/Transform streams, the highWaterMark needs to be explicitly set on the readable and writable states.
This is caused by a bug that is fixed in Streams3

Handle .intoPromise() and .intoCallback() after stream has ended

Currently, if a stream has finished or errored already, and .intoPromise() or .intoCallback() are called, the promise never resolves/callback is never called. This should do the expected of returning a resolved/rejected promise or calling the callback immediately.

SplitStream does not correctly handle trailing windows-style line ending.

I'm seeing some odd behavior when using SplitStream with windows-style line endings, specifically when the input stream ends in one. This seems like it might indicate a larger problem with how trailing delimiters are handled.

const { SplitStream, StringReadableStream } = require('zstreams');

let unix = new StringReadableStream('foo\nbar\n');
let win = new StringReadableStream('foo\r\nbar\r\n');

unix.pipe(new SplitStream()).intoArray()
	.then((array) => {
		console.log(array); // Logs [ 'foo', 'bar' ] as expected.
		return win.pipe(new SplitStream()).intoArray();
	})
	.then((array) => {
		console.log(array); // Logs [ 'foo', 'bar', '\n' ].
	});

FileBufferStream

Hi, i am piping a request to FileBufferStream, then i pipe to passtroughtstream, and consume with fluent-ffmpeg.

some times i got this error line 173:

// We got an EOF but we've written more than we've read ?
throw new Error('Unexpected EOF reading buffer file');

The consumer (ffmpeg) is to fast? how i can resolve this? thanxs.

Add additional event streams

Need the additional event streams:

  • Stream to convert normal object/data stream to events (ex. an XML parser)
  • Stream to convert events to normal object/data stream
  • Subclass of above stream to listen to a single event and convert its payload into an object stream

Document Helpers

Document helper functions from the mixins like .each, .skip, etc.

Deep wrapping of streams

The zstream(...) conversion doesn't work with certain types of streams, particularly older streams that are not streams2 compliant. These need to be deep-wrapped in a way similar to RequestStream . Ideally this would be detected and done automatically in the conversion code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.