Module: Gio::Converter

Defined in:
(unknown)

Overview

#GConverter is implemented by objects that convert binary data in various ways. The conversion can be stateful and may fail at any place.

Some example conversions are: character set conversion, compression, decompression and regular expression replace.

Instance Method Summary collapse

Instance Method Details

#convert(converter, inbuf, inbuf_size, outbuf, outbuf_size, flags, bytes_read, bytes_written) ⇒ Gio::ConverterResult

Returns a GConverter::Result, %G_CONVERTER_ERROR on error.

Parameters:

  • converter (Gio::Converter)

    a #GConverter.

  • inbuf (Array<Integer>)

    the buffer containing the data to convert.

  • inbuf_size (Integer)

    the number of bytes in inbuf

  • outbuf (Array<Integer>)

    a buffer to write converted data in.

  • outbuf_size (Integer)

    the number of bytes in outbuf, must be at least one

  • flags (Gio::ConverterFlags)

    a GConverter::Flags controlling the conversion details

  • bytes_read (Integer)

    will be set to the number of bytes read from inbuf on success

  • bytes_written (Integer)

    will be set to the number of bytes written to outbuf on success

Returns:

#reset(converter) ⇒ nil

Parameters:

Returns:

  • (nil)