Bytes


Description:

public Bytes (uint8[]? data)

Creates a new [struct@GLib.

Bytes] from data.

data is copied. If data.length is 0, data may be `NULL`.

As an optimization, [ctor@GLib.Bytes.new] may avoid an extra allocation by copying the data within the resulting bytes structure if sufficiently small (since GLib 2.84).

Parameters:

data

the data to be used for the bytes

size

the size of data

Returns:

a new [struct@GLib.Bytes]