Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

7
LINES

< > BotCompany Repo | #1004903 // boolArrayFromBytes

JavaX fragment (include)

1  
static bool[] boolArrayFromBytes(byte[] a, int n) {
2  
  bool[] b = new bool[n];
3  
  int m = min(n, l(a)*8);
4  
  for (int i = 0; i < m; i++)
5  
    b[i] = (a[i/8] & 1 << (i & 7)) != 0;
6  
  ret b;
7  
}

Author comment

Began life as a copy of #1004901

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: #1004903
Snippet name: boolArrayFromBytes
Eternal ID of this version: #1004903/1
Text MD5: 69fe0573f279a3dd28d29054dbd1fe52
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:26:24
Source code size: 191 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 660 / 658
Referenced in: [show references]