public String getAlgorithmName(ByteBuf compressedBuffer) {
    if (compressedBuffer == null || compressedBuffer.readableBytes() == 0) {
      throw new IllegalArgumentException("compressedBuffer cannot be null or empty.");
    }

    // The first byte is the version. Skip the version and read the algorithm name length.
    compressedBuffer.markReaderIndex();
    try {
      compressedBuffer.readByte();  // Skip the version.
      byte algorithmNameLength = compressedBuffer.readByte();

      // Read the algorithm name binary.
      byte[] algorithmNameBinary = new byte[algorithmNameLength];
      compressedBuffer.readBytes(algorithmNameBinary);

      // Convert algorithm name binary to string.
      return new String(algorithmNameBinary, StandardCharsets.UTF_8);
    } finally {
      compressedBuffer.resetReaderIndex();
    }
  }
Find the name of the algorithm used to compress the specified compressed buffer.
This method does not alter the index in compressedBuffer.

@param compressedBuffer The compressed buffer generated by the compress() method.
@return Name of the compression algorithm.
ambry-commons/src/main/java/com/github/ambry/compression/CompressionMap.java