Binary.Compress is a Power Query M function that compresses a binary value using the specified compression type (GZip or Deflate). The function returns a compressed copy of the input binary value.
Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365
Syntax
Binary.Compress(
binary as nullable binary,
compressionType as number,
) as nullable binary
Description
Compresses a binary value using the given compression type. The result of this call is a compressed copy of the input. Compression Types include:
- Compression.None
- Compression.GZip
- Compression.Deflate
- Compression.Snappy
- Compression.Brotli
- Compression.LZ4
- Compression.ZStandard
Examples
Compress the binary value.
// Returns #binary({227, 226, 26, 5, 163, 96, 20, 12, 119, 0, 0})
Binary.Compress( Binary.FromList( List.Repeat( {10}, 1000 ) ), Compression.Deflate )
Related functions
Other functions related to Binary.Compress are:
2023-2026 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy