开发者社区> 镜像站> NPM> buffer-byte-frequency
buffer-byte-frequency
Count the frequency of each byte in a buffer
Last updated 4 years ago by emilbay .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install buffer-byte-frequency 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.1                                ...           latest (4 years ago)

2 Versions

  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 4
Dependencies (0)
None
Dev Dependencies (1)
Dependents (2)