Libraryless. Click here for Pure Java version (37L/1K).
static int[] byteHistogramArray(byte[] data) { var histogram = new int[256]; if (data != null) for (b : data) histogram[b & 0xFF]++; ret histogram; }
Began life as a copy of #1008499
download show line numbers debug dex old transpilations
Travelled to 2 computer(s): elmgxqgtpvxh, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1035666 |
| Snippet name: | byteHistogramArray - histogram of byte array as int[256] |
| Eternal ID of this version: | #1035666/3 |
| Text MD5: | 9e6e8e7496cd7594492de7601a13fbb9 |
| Transpilation MD5: | d12bf9baed4fd5f3941be94b17db1491 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-07-01 05:59:44 |
| Source code size: | 171 bytes / 7 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 392 / 491 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |