Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: ZlibCompressorMeta

[214:14] static extends: object

Generated metadata helpers for ZlibCompressor class surfaces.

Methods

  • properties ()

    Returns property metadata for ZlibCompressor.

    • @r A list.

class: ZlibCompressor

[14:7] extends: object

GZlibCompressor is an implementation of [iface@Gio.Converter] that compresses data using zlib.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • ZlibCompressor (format = null, level = null)

    Creates a compressor.

    • @p format is the format to use for the compressed data.
    • @p level is compression level (0-9), -1 for default.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asObject ()

    Wraps this handle as Object.

    • @r A Object object.
  • asConverter ()

    Wraps this handle as Converter.

    • @r A Converter object.
  • getProperty (string Name)

    Reads one generated property by name.

  • setProperty (string Name, Value)

    Writes one generated property by name.

  • setFileinfo (object Value)

    A [class@Gio.FileInfo] containing file information to put into the gzip header. The file name and modification time from the file info will be used. This will only be used if non-NULL and [property@Gio.ZlibCompressor:format] is [enum@Gio.ZlibCompressorFormat.GZIP].

    • @p Value is the new property value.
    • @r None.
  • setOs (int Value)

    The OS code of the gzip header. This will be used if set to a non-negative value, and if [property@Gio.ZlibCompressor:format] is [enum@Gio.ZlibCompressorFormat.GZIP], the compressor will set the OS code of the gzip header to this value. If the value is unset, zlib will set the OS code depending on the platform. This may be undesirable when reproducible output is desired. In that case setting the OS code to 3 (for Unix) is recommended.

    • @p Value is the new property value.
    • @r None.
  • get_file_info ()

    Gets the [property@Gio.ZlibCompressor:file-info] property.

  • get_os ()

    Gets the [property@Gio.ZlibCompressor:os] property.

  • set_file_info (object file_info)

    Sets the [property@Gio.ZlibCompressor:file-info] property. Note: it is an error to call this function while a compression is in progress; it may only be called immediately after creation of @compressor, or after resetting it with [method@Gio.Converter.reset].

    • @p file_info is file info for the gzip header.
    • @r None.
  • set_os (int os)

    Sets the [property@Gio.ZlibCompressor:os] property. Note: it is an error to call this function while a compression is in progress; it may only be called immediately after creation of @compressor, or after resetting it with [method@Gio.Converter.reset].

    • @p os is the OS code to use, or -1 to unset.
    • @r None.