@adviser/cement - v0.0.0
    Preparing search index...

    Function bin2text

    • Formats binary data as hexdump output with ASCII representation.

      Produces hexdump-style output similar to xxd or hexdump commands, showing hex values and ASCII characters side-by-side. Each line shows 16 bytes with offset, hex values, and printable ASCII characters.

      Parameters

      • hex: ArrayBufferView

        Binary data to format (any ArrayBufferView)

      • lineFn: (line: string) => void

        Callback function invoked for each formatted line

      • size: number = 0

        Maximum number of bytes to format (0 = all bytes)

      Returns void

      const data = new Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100]);
      bin2text(data, (line) => console.log(line));
      // Output:
      // 0000 48 65 6c 6c 6f 20 57 6f 72 6c 64 Hello World