Count the frequency of each byte in a buffer
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE.md
README.md
index.js
package.json
test.js

README.md

buffer-byte-frequency

Count the frequency of each byte in a buffer

Usage

'use strict'

var freq = require('buffer-byte-frequency')

freq(Buffer.from([0, 1, 2, 3])) // => [1, 1, 1, 1, 0, 0, 0, 0, 0, ...]

API

freq(buf)

Counts the frequency of each byte, returning a 256 element array with counts for each byte.

License

ISC