Skip to content

calculate the shannon H measure for entropy on a stream of literals

Notifications You must be signed in to change notification settings

tmcw-up-for-adoption/stream-entropy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

stream-entropy

Measures the shannon entropy of a stream of Javascript literals.

api

.stream()

Generate a writable and readable stream that accepts a stream of literals and emits an end event with the shannon entropy H measure.

example

var ent = entropy.stream();
ent.on('end', function(d) {
    console.log('the shannon measure is ', d);
});

for (var i = 0; i < 10; i++) ent.write(i);
ent.end();

see also

Heavily inspired by node-entropy.

About

calculate the shannon H measure for entropy on a stream of literals

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published