static byte bytesNeeded(long v) {
    if (v < 0) {
      v = ~v;
    }
    return (byte) (((64 - Long.numberOfLeadingZeros(v)) / 8) + 1);
  }
Return the number of bytes needed to encode the given long. Value returned will be >= 1 and <=
8.
geode-core/src/main/java/org/apache/geode/internal/cache/Oplog.java