OpenBI Docs Buy

Binary.ToList

The bytes of a binary as a list of numbers, each from 0 to 255.

Group: Binary and lines. Power Query M has it too: a query that uses it is written as in Power BI.

Syntax

Binary.ToList(binary as binary) as list
ParameterTypeDescription
binarybinaryThe bytes to take apart.

Returns

list. One number per byte, in order; an empty list for an empty binary.

Remarks

  • The reverse of Binary.FromList. List functions then work on the bytes: count, sum or pick them.

Examples

A word in UTF-8

Binary.ToList(Text.ToBinary("Oslo"))
{79, 115, 108, 111}

Two bytes for each ø

Binary.ToList(Text.ToBinary("Smørbrød"))
{83, 109, 195, 184, 114, 98, 114, 195, 184, 100}

Each ø is the pair 195, 184 in UTF-8.

Binary.FromList, #binary, Text.ToBinary, Binary.Length.

Last updated · OpenBI Studio 0.3.79