public static void writeVLOld(long data, DataOutput out) throws IOException {
    if (data < 0) {
      Assert.fail("Data expected to be >=0 is " + data);
    }
    if (data <= StaticSerialization.MAX_BYTE_VL) {
      out.writeByte((byte) data);
    } else if (data <= 0x7FFF) {
      // set the sign bit to indicate a short
      out.write(((int) data >>> 8 | 0x80) & 0xFF);
      out.write((int) data & 0xFF);
    } else if (data <= Integer.MAX_VALUE) {
      out.writeByte(StaticSerialization.INT_VL);
      out.writeInt((int) data);
    } else {
      out.writeByte(StaticSerialization.LONG_VL);
      out.writeLong(data);
    }
  }
Write a variable length long the old way (pre 7.0). Use this only in contexts where you might
need to communicate with pre 7.0 members or files.
geode-core/src/main/java/org/apache/geode/internal/InternalDataSerializer.java