rEFIt_UEFI/libeg/lodepng.cpp
/* integer approximation for i * log2(i), helper function for LFS_ENTROPY */
integer approximation for i * log2(i), helper function for LFS_ENTROPY
integer approximation for i * log2 ( i ) helper function for LFS_ENTROPY
static size_t ilog2i(size_t i) {
  size_t l;
  if(i == 0) return 0;
  l = ilog2(i);
  return i * l + LShiftU64(i - LShiftU64(1u, l), 1u);
}
static size_t ilog2i ( size_t i ) { size_t l ; if ( i == 0 ) return 0 ; l = ilog2 ( i ) ; return i * l + LShiftU64 ( i - LShiftU64 ( 1u , l ) , 1u ) ; }
integer approximation for i * log2(i), helper function for LFS_ENTROPY
integer approximation for i * log2 ( i ) helper function for LFS_ENTROPY
/* approximate i*log2(i): l is integer logarithm, ((i - (1u << l)) << 1u)
  linearly approximates the missing fractional part multiplied by i */ //  return i * l + ((i - (1u << l)) << 1u);