docs: private static void writeLength(ByteBuffer buf, int length) {
          assert(length >= 0);
          assert(length == (length & (~length + 1))); // check if power of two
  
          // shockingly fast log_2 uses intrinsics in JDK >= 1.7
          byte log2size = (byte) (32 - Integer.numberOfLeadingZeros(length));
  
          buf.put(log2size);
      }