### Class

# GnomeAutoar Compressor

#### Description

    final class GnomeAutoar.Compressor : GObject.Object
    {
      /* No available fields */
    }

No description available.

#### Hierarchy

#### Ancestors

- GObject

#### Constructors

###### autoar_compressor_new

Create a new `AutoarCompressor` object.

#### Functions

###### autoar_compressor_quark

Gets the `AutoarCompressor` Error Quark.

#### Instance methods

###### autoar_compressor_get_completed_files

Gets the number of files has been read.

###### autoar_compressor_get_completed_size

Gets the size in bytes has been read from the source files and directories.

###### autoar_compressor_get_create_top_level_directory

Gets whether a top level directory will be created in the new archive.

###### autoar_compressor_get_files

Gets the number of files will be read when the operation is completed. This value is currently unset, so calling this function is useless.

###### autoar_compressor_get_filter

Gets the compression filter.

###### autoar_compressor_get_format

Gets the compression format.

###### autoar_compressor_get_notify_interval

See autoar_compressor_set_notify_interval().

###### autoar_compressor_get_output_file

If `AutoarCompressor:output_is_dest` is `FALSE`, gets the directory which contains the new archive. Otherwise, gets the the new archive. See autoar_compressor_set_output_is_dest().

###### autoar_compressor_get_output_is_dest

See autoar_compressor_set_output_is_dest().

###### autoar_compressor_get_size

Gets the size in bytes will be read when the operation is completed. This value is currently unset, so calling this function is useless.

###### autoar_compressor_get_source_files

Gets the list of source files.

###### autoar_compressor_set_notify_interval

Sets the minimal interval between emission of `AutoarCompressor::progress` signal. This prevent too frequent signal emission, which may cause performance impact. If you do not want this feature, you can set the interval to 0, so you will receive every progress update.

###### autoar_compressor_set_output_is_dest

By default `AutoarCompressor:output-is-dest` is set to `FALSE`, which means the new archive will be created as a regular file under `AutoarCompressor:output` directory. The name of the new archive will be automatically generated and you will be notified via `AutoarCompressor::decide-dest` when the name is decided. If you have already decided the location of the new archive, and you do not want `AutoarCompressor` to decide it for you, you can set `AutoarCompressor:output-is-dest` to `TRUE`. `AutoarCompressor` will use `AutoarCompressor:output` as the location of the new archive, and it will neither check whether the file exists nor create the necessary directories for you. This function should only be called before calling `autoar_compressor_start()` or autoar_compressor_start_async().

###### autoar_compressor_set_passphrase

Sets the archive passphrase. It works only with `ARCHIVE_FORMAT_ZIP`.

###### autoar_compressor_start

Runs the archive creating work. All callbacks will be called in the same thread as the caller of this functions.

###### autoar_compressor_start_async

Asynchronously runs the archive creating work. You should connect to `AutoarCompressor::cancelled`, `AutoarCompressor::error`, and `AutoarCompressor::completed` signal to get notification when the work is terminated. All callbacks will be called in the main thread, so you can safely manipulate GTK widgets in the callbacks.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### GnomeAutoar.Compressor:completed-files

No description available.

###### GnomeAutoar.Compressor:completed-size

No description available.

###### GnomeAutoar.Compressor:create-top-level-directory

No description available.

###### GnomeAutoar.Compressor:files

No description available.

###### GnomeAutoar.Compressor:filter

No description available.

###### GnomeAutoar.Compressor:format

No description available.

###### GnomeAutoar.Compressor:notify-interval

No description available.

###### GnomeAutoar.Compressor:output-file

No description available.

###### GnomeAutoar.Compressor:output-is-dest

No description available.

###### GnomeAutoar.Compressor:size

No description available.

###### GnomeAutoar.Compressor:source-files

No description available.

#### Signals

###### GnomeAutoar.Compressor::cancelled

This signal is emitted after archive creating job is cancelled by the `GCancellable`.

###### GnomeAutoar.Compressor::completed

This signal is emitted after the archive creating job is successfully completed.

###### GnomeAutoar.Compressor::decide-dest

This signal is emitted when the location of the new archive is determined.

###### GnomeAutoar.Compressor::error

This signal is emitted when error occurs and all jobs should be terminated. Possible error domains are `AUTOAR_COMPRESSOR_ERROR`, `G_IO_ERROR`, and `AUTOAR_LIBARCHIVE_ERROR`, which represent error occurs in `AutoarCompressor`, GIO, and libarchive, respectively. The `GError` is owned by `AutoarCompressor` and should not be freed.

###### GnomeAutoar.Compressor::progress

This signal is used to report progress of creating archives. The value of `completed_size` and `completed_files` are the same as the `AutoarCompressor:completed_size` and `AutoarCompressor:completed_files` properties, respectively.

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct GnomeAutoarCompressorClass {
      GObjectClass parent_class;

    }

No description available.

###### Class members

`parent_class: GObjectClass`

  No description available.