byte[] decodeAddressToRawBytes(long addr) {
    if ((addr & ENCODED_BIT) == 0) {
      throw new AssertionError("Invalid address: " + addr);
    }

    int size = (int) ((addr & SIZE_MASK) >> SIZE_SHIFT);
    boolean isLong = (addr & LONG_BIT) != 0;
    byte[] bytes;

    if (isLong) {
      bytes = new byte[9];
      bytes[0] = DSCODE.LONG.toByte();
      for (int i = 8; i >= 2; i--) {
        addr >>= 8;
        bytes[i] = (byte) (addr & 0x00ff);
      }
      if ((bytes[2] & 0x80) != 0) {
        bytes[1] = -1;
      } else {
        bytes[1] = 0;
      }
    } else {
      bytes = new byte[size];
      for (int i = size - 1; i >= 0; i--) {
        addr >>= 8;
        bytes[i] = (byte) (addr & 0x00ff);
      }
    }

    return bytes;
  }
Returns the "raw" bytes that have been encoded in the given address. Note that if address is
compressed then the raw bytes are the compressed bytes.
geode-core/src/main/java/org/apache/geode/internal/offheap/OffHeapRegionEntryHelperInstance.java