Binary.Decompress

Updated on

Binary.Decompress is a Power Query M function that decompresses a binary value using the specified compression type (GZip or Deflate). The function returns a decompressed copy of the input binary value.

Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365

Syntax

Binary.Decompress(
   binary as nullable binary,
   compressionType as number,
) as nullable binary
ArgumentAttributeDescription
binaryA binary value to decompress.
compressionTypeDefines the format of the compressed data using Compression.Type. Available formats are:
Compression.None: for uncompressed data.
Compression.GZip: for GZip format.
Compression.Deflate: For ‘Deflate’ format.
Compression.Snappy: For ‘Snappy’ format.
Compression.Brotli: For ‘Brotli’ format.
Compression.LZ4: For ‘LZ4’ format.
Compression.Zstandard: For ‘Zstandard’ format.

Description

Binary.Decompress is used to decompress a binary value with specified compression types, such as GZip or Deflate. It returns a decompressed version of the input binary.

Examples

Decompress the binary value.

// Output: #binary( {71, 0, 111, 0, 111, 0, 100, 0, 98, 0, 121, 0, 101, 0} )
Binary.Decompress( 
  #binary( {115, 103, 200, 7, 194, 20, 134, 36, 134, 74, 134, 84, 6, 0} ), 
  Compression.Deflate 
)

Other functions related to Binary.Decompress are:

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/binary-decompress