Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

a transform-stream that efficiently replaces sequences of bytes in a binary stream, for Node and browsers.

Notifications You must be signed in to change notification settings

regular/binary-stream-replace

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm version browser support

binary-stream-replace

A transform-stream for Node and browsers that efficeintly replaces sequences of bytes in a binary stream. Can be restricted to replace first n occurrences only.

Usage

var ReplaceStream = require('binary-stream-replace');

// replace first 10 occurrences of byte sequence `fe fe` with
// `00 00 01`
var rs = ReplaceStream(
    new Buffer([0xfe, 0xfe]),
    new Buffer([0x00, 0x00, 0x01]),
    { maxOccurrences: 10 }
);

process.stdin.pipe(rs).pipe(process.stdout); 

About

a transform-stream that efficiently replaces sequences of bytes in a binary stream, for Node and browsers.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.