Libraryless. Click here for Pure Java version (50L/1K).
1 | static byte[] intArrayToBytes_littleEndian_flexLength(int[] a, int n) {
|
2 | byte[] b = new byte[n]; |
3 | int full = n/4; |
4 | for (int i = 0; i < full; i++) |
5 | intToBytes_inArray_littleEndian(a[i], b, i*4); |
6 | if ((n & 3) != 0) |
7 | intToBytes_inArray_littleEndian_partial(a[full], b, full*4); |
8 | ret b; |
9 | } |
Began life as a copy of #1029378
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1031655 |
| Snippet name: | intArrayToBytes_littleEndian_flexLength |
| Eternal ID of this version: | #1031655/3 |
| Text MD5: | 9c5b4d25c8e9828e5b7f960f980d3760 |
| Transpilation MD5: | f733aaec9a144b3e4f662e3a55eb0d2f |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-06-25 04:14:45 |
| Source code size: | 303 bytes / 9 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 372 / 514 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |