code: private byte[] bufD(final int valsz, boolean na_sparse){
      int elem_size = valsz+4;
      byte [] res = MemoryManager.malloc1(CXIChunk._OFF + _sparseLen*elem_size);
      UnsafeUtils.set4(res,0,_len);
      res[4] = (byte)4;
      res[5] = (byte)valsz;
      res[6] = na_sparse?(byte)1:0;
      if(na_sparse)res[6] = (byte)1;
      for(int i = 0; i < _sparseLen; ++i){
        UnsafeUtils.set4(res,CXIChunk._OFF+i*elem_size+0,_id[i]);
        if(valsz == 4){
          UnsafeUtils.set4f(res,CXIChunk._OFF+i*elem_size+4,(float)_ds[i]);
        } else if(valsz == 8) {
          UnsafeUtils.set8d(res,CXIChunk._OFF+i*elem_size+4,_ds[i]);
        } else throw H2O.unimpl();
      }
      return res;
    }
docs: Compute a sparse float buffer