Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brendanashworth/byter
Count same-byte occurrences within binary files
https://github.com/brendanashworth/byter
Last synced: 9 days ago
JSON representation
Count same-byte occurrences within binary files
- Host: GitHub
- URL: https://github.com/brendanashworth/byter
- Owner: brendanashworth
- License: mit
- Created: 2014-11-07T05:24:44.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-11-08T23:02:22.000Z (about 10 years ago)
- Last Synced: 2024-06-21T11:49:15.312Z (5 months ago)
- Language: Go
- Size: 125 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# byter
[![GoDoc](https://godoc.org/github.com/brendanashworth/byter?status.svg)](http://godoc.org/github.com/brendanashworth/byter/api)> A simple CLI utility (with an internal API) for calculating the percentages of same-byte occurrences within a binary file. By default it will print all bytes with an occurrence rate of more than 1%.
### Usage
```bash
$ go build
$ ./byter
```Example output:
```
|--------------|
| 0x1 | 2% |
|--------------|
| 0x65 | 1% |
|--------------|
| 0x0 | 38% |
|--------------|
| 0x2 | 2% |
|--------------|
| 0x48 | 3% |
|--------------|
| 0x24 | 2% |
|--------------|
| 0x8B | 1% |
|--------------|Parsed 2091696 bytes.
```### Example API
```go
package mainimport (
"github.com/brendanashworth/byter/api"
)func main() {
var data []byte
// ..totalBytes, occurrenceMap := byter.CountOccurrences(data)
// ..
}
```