Skip to main content

Binary.Compress

Compresses a binary value using the given compression type.

Syntax

Binary.Compress(
binary as binary,
compressionType as Compression.Type
) as binary

Remarks

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.GZip
  • Compression.Deflate

Examples

Example #1

Compress the binary value.

Binary.Compress(Binary.FromList(List.Repeat({10}, 1000)), Compression.Deflate)

Result:

#binary({227, 226, 26, 5, 163, 96, 20, 12, 119, 0, 0})

Category

Binary