docs: private byte[] bufB(int bpv) {
      assert bpv == 1 || bpv == 2 : "Only bit vectors with/without NA are supported";
      final int off = CBSChunk.OFF;
      int clen  = off + CBSChunk.clen(_len, bpv);
      byte bs[] = new byte[clen];
      // Save the gap = number of unfilled bits and bpv value
      bs[0] = (byte) (((_len*bpv)&7)==0 ? 0 : (8-((_len*bpv)&7)));
      bs[1] = (byte) bpv;
  
      // Dense bitvector
      int  boff = 0;
      byte b    = 0;
      int  idx  = CBSChunk.OFF;
      int j = 0;
      for (int i=0; i<_len; i++) {
        byte val = 0;
        if(_id == null || (j < _id.length && _id[j] == i)) {
          assert bpv == 2 || !isNA2(j);
          val = (byte)(isNA2(j)?CBSChunk._NA:_ls[j]);
          ++j;
        }
        if( bpv==1 )
          b = CBSChunk.write1b(b, val, boff);
        else
          b = CBSChunk.write2b(b, val, boff);
        boff += bpv;
        if (boff>8-bpv) { assert boff == 8; bs[idx] = b; boff = 0; b = 0; idx++; }
      }
      assert j == _sparseLen;
      assert bs[0] == (byte) (boff == 0 ? 0 : 8-boff):"b[0] = " + bs[0] + ", boff = " + boff + ", bpv = " + bpv;
      // Flush last byte
      if (boff>0) bs[idx] = b;
      return bs;
    }