1 | static byte[] boolArrayToBytes(bool[] a) { |
2 | byte[] b = new byte[(l(a)+7)/8]; |
3 | for (int i = 0; i < l(a); i++) |
4 | if (a[i]) |
5 | b[i/8] |= 1 << (i & 7); |
6 | ret b; |
7 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1004901 |
Snippet name: | boolArrayToBytes |
Eternal ID of this version: | #1004901/1 |
Text MD5: | 3b011fb3305c5d4a8a8545a32c618ca5 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-09-15 23:11:32 |
Source code size: | 171 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 584 / 904 |
Referenced in: | [show references] |