int decodeAddressToDataSize(long address) {
    if ((address & ENCODED_BIT) == 0) {
      throw new AssertionError("Invalid address: " + address);
    }
    boolean isLong = (address & LONG_BIT) != 0;
    if (isLong) {
      return 9;
    }
    return (int) ((address & SIZE_MASK) >> SIZE_SHIFT);
  }
Returns 0 if the data could not be encoded as an address.
geode-core/src/main/java/org/apache/geode/internal/offheap/OffHeapRegionEntryHelperInstance.java