All Projects → fent → node-stream-equal

fent / node-stream-equal

Licence: MIT license
Test that two readable streams are equal to each other.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to node-stream-equal

StreamLinkerino
Twitch.tv client using only StreamLink, MPV, and Chatterino
Stars: ✭ 26 (+8.33%)
Mutual labels:  stream
net-Socket
A minimalist wrapper around System.Net.Sockets.Socket.
Stars: ✭ 21 (-12.5%)
Mutual labels:  stream
rxjava2-http
Transmit RxJava2 Flowable over http with non-blocking backpressure
Stars: ✭ 19 (-20.83%)
Mutual labels:  stream
godsend
A simple and eloquent workflow for streaming messages to micro-services.
Stars: ✭ 15 (-37.5%)
Mutual labels:  stream
binary
Clojure API for binary format I/O using java's stream apis
Stars: ✭ 67 (+179.17%)
Mutual labels:  stream
live-torrent-backend
The backend server for the live-torrent project
Stars: ✭ 38 (+58.33%)
Mutual labels:  stream
unpipe
Unpipe a stream from all destinations
Stars: ✭ 23 (-4.17%)
Mutual labels:  stream
irc-tts
Broadcast your IRC channel via a text-to-speech webserver
Stars: ✭ 14 (-41.67%)
Mutual labels:  stream
RxLoading
RxJava library for showing a loading (i.e. progress bar) state while waiting for async data with minimal effort and advanced options.
Stars: ✭ 49 (+104.17%)
Mutual labels:  stream
live-stream-media-source-extensions
Live stream h264 encoded mp4 video on media source extensions using ffmpeg, node.js, socket.io, and express. Works in chrome, firefox, safari, and android. Not iOS compatible. Work has moved to mse-live-player repo =>
Stars: ✭ 24 (+0%)
Mutual labels:  stream
conti
minimalistic playout server
Stars: ✭ 23 (-4.17%)
Mutual labels:  stream
go-callbag
golang implementation of Callbag
Stars: ✭ 19 (-20.83%)
Mutual labels:  stream
deep-action-detection
Multi-stream CNN architectures for action detection with actor-centric filtering
Stars: ✭ 24 (+0%)
Mutual labels:  stream
camera.ui
NVR like user Interface for RTSP capable cameras
Stars: ✭ 99 (+312.5%)
Mutual labels:  stream
fridgefm-radio-core
Simple lightweight package for creating your own radio station via NodeJS heavily inspired by Shoutcast and Icecast.
Stars: ✭ 32 (+33.33%)
Mutual labels:  stream
ee.Yrewind
Can rewind and save YouTube live stream
Stars: ✭ 133 (+454.17%)
Mutual labels:  stream
node-advanced
Node Advanced Courseware
Stars: ✭ 80 (+233.33%)
Mutual labels:  stream
react-webrtc-chat
React WebRTC chat
Stars: ✭ 39 (+62.5%)
Mutual labels:  stream
wise-river
Object streaming the way it should be.
Stars: ✭ 33 (+37.5%)
Mutual labels:  stream
multipart-read-stream
Read a multipart stream over HTTP
Stars: ✭ 13 (-45.83%)
Mutual labels:  stream

node-stream-equal

Test that two readable streams are equal to each other.

Dependency Status codecov

Usage

const streamEqual = require('stream-equal');
const fs = require('fs');

let readStream1 = fs.createReadStream(file);
let readStream2 = fs.createReadStream(file);
let equal = await streamEqual(readStream1, readStream2);

Motive

Useful for testing. This method of comparing is faster and uses less memory than buffering entire streams and comparing their content, specially for bigger files.

You could also get the hash sum of a stream to test it against another stream. Which is similar to what this library does, without the hashing.

API

async streamEqual(readStream1, readStream2)

A function that compares each data event on both streams, pausing when needed to keep them in sync. Returns a proimse that resolves to either true or false.

Install

npm install stream-equal

Tests

Tests are written with mocha

npm test
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].