code: private byte[] bufX( long bias, int scale, int off, int log ) {
      byte[] bs = MemoryManager.malloc1((_len <<log)+off);
      int j = 0;
      for( int i=0; i< _len; i++ ) {
        long le = -bias;
        if(_id == null || _id.length == 0 || (j < _id.length && _id[j] == i)){
          if( isNA2(j) ) {
            le = NAS[log];
          } else {
            int x = (_xs.get(j)==Integer.MIN_VALUE+1 ? 0 : _xs.get(j))-scale;
            le += x >= 0
                ? _ms.get(j)*PrettyPrint.pow10i( x)
                : _ms.get(j)/PrettyPrint.pow10i(-x);
          }
          ++j;
        }
        switch( log ) {
        case 0:          bs [i    +off] = (byte)le ; break;
        case 1: UnsafeUtils.set2(bs,(i<<1)+off,  (short)le); break;
        case 2: UnsafeUtils.set4(bs, (i << 2) + off, (int) le); break;
        case 3: UnsafeUtils.set8(bs, (i << 3) + off, le); break;
        default: throw H2O.fail();
        }
      }
      assert j == _sparseLen :"j = " + j + ", _sparseLen = " + _sparseLen;
      return bs;
    }
docs: Compute a compressed integer buffer