static boolean DecodeEntry(ByteCollection p, int beg, int limit,
			threeInt io3ints) {
		if (limit - beg < 3)
			return false;
		p.curr_pos = beg;
		// wlu, 2012-7-7, bugfix: should not directly convert byte to int, need
		// to deal with byte values >= 128
		int shared = p.bytes[p.curr_pos] & 0xff;
		int non_shared = p.bytes[p.curr_pos + 1] & 0xff;
		int value_length = p.bytes[p.curr_pos + 2] & 0xff;
		if ((shared | non_shared | value_length) < 128) {
			// Fast path: all three values are encoded in one byte each
			p.curr_pos += 3;
		} else {
			shared = coding.GetVarint32(p);
			if (p.curr_pos > limit)
				return false;
			non_shared = coding.GetVarint32(p);
			if (p.curr_pos > limit)
				return false;
			value_length = coding.GetVarint32(p);
			if (p.curr_pos > limit)
				return false;
		}

		// refer to comment for the data structure
		if ((limit - p.curr_pos) < (non_shared + value_length)) {
			return false;
		}
		io3ints.shared = shared;
		io3ints.non_shared = non_shared;
		io3ints.value_length = value_length;
		return true;
	}