public long ApproximateOffsetOf(Version v, InternalKey ikey) {
		long result = 0;
		for (int level = 0; level < config.kNumLevels; level++) {
			List<FileMetaData> files = v.files_.get(level);
			for (int i = 0; i < files.size(); i++) {
				if (icmp_.Compare(files.get(i).largest, ikey) <= 0) {
					// Entire file is before "ikey", so just add the file size
					result += files.get(i).file_size;
				} else if (icmp_.Compare(files.get(i).smallest, ikey) > 0) {
					// Entire file is after "ikey", so ignore
					if (level > 0) {
						// Files other than level 0 are sorted by
						// meta->smallest, so
						// no further files in this level will contain data for
						// "ikey".
						break;
					}
				} else {
					// "ikey" falls in the range for this table. Add the
					// approximate offset of "ikey" within the table.
					Table tableptr[] = new Table[1];
					table_cache_.NewIterator(new ReadOptions(),
							files.get(i).number, files.get(i).file_size,
							tableptr);
					if (tableptr != null) {
						result += tableptr[0]
								.ApproximateOffsetOf(ikey.Encode());
					}
				}
			}
		}
		return result;
	}