decompressIfNeeded

Decompresses the byte array if it is compressed using Zstd or Gzip compression.

Return

The decompressed byte array, or the original byte array if it is not compressed.