could be unordered, ordered, compact, or not, size >= 8
765388
private void processVer3(final Memory skMem) {
    Util.checkSeedHashes(seedHash_, skMem.getShort(SEED_HASH_SHORT));
    final int preLongs = skMem.getByte(PREAMBLE_LONGS_BYTE) & 0X3F;
    final int curCount;
    final long thetaLongIn;
    if (preLongs == 1) { //SingleItemSketch if not empty, Read-Only, Compact and Ordered
      final int flags = skMem.getByte(FLAGS_BYTE);
      if (flags == (READ_ONLY_FLAG_MASK | COMPACT_FLAG_MASK | ORDERED_FLAG_MASK)) {
        curCount = 1;
        thetaLongIn = Long.MAX_VALUE;
      } else {
        return; //otherwise an empty sketch {1.0, 0, T}
      }
    }
    else if (preLongs == 2) { //curCount has to be > 0 and exact mode. Cannot be from intersection.
      curCount = skMem.getInt(RETAINED_ENTRIES_INT);
      assert curCount > 0;
      thetaLongIn = Long.MAX_VALUE;
    }
    else { //prelongs == 3, curCount may be 0 (e.g., from intersection).
      curCount = skMem.getInt(RETAINED_ENTRIES_INT);
      assert curCount > 0;
      thetaLongIn = skMem.getLong(THETA_LONG);
    }
    unionThetaLong_ = min(unionThetaLong_, thetaLongIn); //theta rule
    final boolean ordered = (skMem.getByte(FLAGS_BYTE) & ORDERED_FLAG_MASK) != 0;
    if (ordered) { //must be compact
      for (int i = 0; i < curCount; i++ ) {
        final int offsetBytes = (preLongs + i) << 3;
        final long hashIn = skMem.getLong(offsetBytes);
        if (hashIn >= unionThetaLong_) { break; } // "early stop"
        gadget_.hashUpdate(hashIn); //backdoor update, hash function is bypassed
      }
    }
    else { //not-ordered, could be compact or hash-table form
      final boolean compact = (skMem.getByte(FLAGS_BYTE) & COMPACT_FLAG_MASK) != 0;
      final int size = (compact) ? curCount : 1 << skMem.getByte(LG_ARR_LONGS_BYTE);
      for (int i = 0; i < size; i++ ) {
        final int offsetBytes = (preLongs + i) << 3;
        final long hashIn = skMem.getLong(offsetBytes);
        if ((hashIn <= 0L) || (hashIn >= unionThetaLong_)) { continue; }
        gadget_.hashUpdate(hashIn); //backdoor update, hash function is bypassed
      }
    }
    unionThetaLong_ = min(unionThetaLong_, gadget_.getThetaLong()); //sync thetaLongs
    unionEmpty_ = unionEmpty_ && gadget_.isEmpty();
  }
1294532
public void compact()
    {
        final int idealCapacity = (int)Math.round(size() * (1.0 / loadFactor));
        rehash(findNextPositivePowerOfTwo(Math.max(MIN_CAPACITY, idealCapacity)));
    }
19726
@Override
    public Tuple8<Maybe<A>, Maybe<B>, Maybe<C>, Maybe<D>, Maybe<E>, Maybe<F>, Maybe<G>, Maybe<H>> project() {
        return into8(HList::tuple, CoProduct8.super.project());
    }
611368
function compact (arr) {
  var idx = -1
  var end = arr.length
  var out = []

  while (++idx < end) {
    if (arr[idx]) out.push(arr[idx])
  }

  return out
}
862654
function compact(value, keepNewlines) {
  var check = keepNewlines ? / +/g : /\s+/g;
  return value.replace(check, ' ');
}
1046575
def box(self, row, col):
        """"""
        box = []
        box_i = (row // self.order) * self.order
        box_j = (col // self.order) * self.order
        for i in utils.range_(box_i, box_i + self.order):
            for j in utils.range_(box_j, box_j + self.order):
                box.append(self[i][j])
        return box
286141
def itemsize_bits(self):
        """"""
        if self.dtype is not None:
            return self.dtype.itemsize * 8
        else:
            return sum(x[1] for x in self.format)
977469
function pack(items) {
		var data = arguments,
			idx = 0,
			buffer,
			bufferSize = 0;

		// Calculate buffer size
		items = items.split('');
		items.forEach(function(type) {
			if (type == 'v') {
				bufferSize += 2;
			} else if (type == 'V' || type == 'l') {
				bufferSize += 4;
			}
		});

		// Fill buffer
		buffer = new Buffer(bufferSize);
		items.forEach(function(type, index) {
			if (type == 'v') {
				buffer.writeUInt16LE(data[index + 1], idx);
				idx += 2;
			} else if (type == 'V') {
				buffer.writeUInt32LE(data[index + 1], idx);
				idx += 4;
			} else if (type == 'l') {
				buffer.writeInt32LE(data[index + 1], idx);
				idx += 4;
			}
		});

		return buffer;
	}
209446
function compact(arr) {
  if (!Array.isArray(arr)) {
    throw new Error('expected an array');
  }
  var result = [];
  var len = arr.length;
  for (var i = 0; i < len; i++) {
    var elem = arr[i];
    if (elem) {
      result.push(elem);
    }
  }
  return result;
}
686462
function(buff, off, buff_size) {
    var n;

    if(!zip_initflag)
    {
	zip_init_deflate();
	zip_initflag = true;
	if(zip_lookahead == 0) { // empty
	    zip_complete = true;
	    return 0;
	}
    }

    if((n = zip_qcopy(buff, off, buff_size)) == buff_size)
	return buff_size;

    if(zip_complete)
	return n;

    if(zip_compr_level <= 3) // optimized for speed
	zip_deflate_fast();
    else
	zip_deflate_better();
    if(zip_lookahead == 0) {
	if(zip_match_available != 0)
	    zip_ct_tally(0, zip_window[zip_strstart - 1] & 0xff);
	zip_flush_block(1);
	zip_complete = true;
    }
    return n + zip_qcopy(buff, n + off, buff_size - n);
}
323010
function toHumanReadableSize(size, len) {
  if(!size) return '0B';
  if (!len || len <= 0) {
    len = 2;
  }
  var units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
  var i = Math.floor( Math.log(size) / Math.log(1024));
  return (size/Math.pow(1024, i)).toFixed(len) + units[i];
}
666590
def _len_set(obj):
    '''
    '''
    n = len(obj)
    if n > 8:  # assume half filled
       n = _power2(n + n - 2)
    elif n:  # at least 8
       n = 8
    return n
932097
function compact(object) {
    let result = {};

    keys(object).forEach(key => {
      const value = object[key];
      if (!value.isNothing) {
        result[key] = value.get();
      }
    });

    return result;
  }
7541
def force_F_ordered_symmetric(A):
    
    if A.flags['F_CONTIGUOUS']:
        return A
    if A.flags['C_CONTIGUOUS']:
        return A.T
    else:
        return np.asfortranarray(A)
641544
function containedInOrder(needle, haystack) {
  var i, j = 0;
  for (i = 0; i < needle.length; i++) {
    while (j < haystack.length && needle[i] !== haystack[j]) j++;
  }
  return i === needle.length && j < haystack.length;
}
1338834
function(size) {
        var result = 0,
            i;
        this.checkOffset(size);
        for (i = this.index + size - 1; i >= this.index; i--) {
            result = (result << 8) + this.byteAt(i);
        }
        this.index += size;
        return result;
    }
548959
@GuardedBy("lock")
    protected boolean _compact() {
        int new_cap=buffer.length >> 1; // needs to be a power of 2 for efficient modulo operation, e.g. for index()
        // boolean compactable=this.buffer.length > 0 && (size() <= new_cap || (contiguousSpaceAvailable=_contiguousSpaceAvailable(new_cap)));
        boolean compactable=this.buffer.length > 0 && high-low <= new_cap;
        if(!compactable)
            return false; // not enough space to shrink the buffer to half its size
        _copy(new_cap);
        return true;
    }