Class: Gio::ZlibCompressor

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Constructor Details

#initialize(format, level) ⇒ Gio::ZlibCompressor

Creates a compressor.

Parameters:

  • format (Gio::ZlibCompressorFormat) —

    the format to use for the compressed data

  • level (Integer) —

    compression level (0-9), -1 for default

Instance Method Details

#file_info ⇒ Gio::FileInfo

A [classGio.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
[propertyGio.ZlibCompressor:format] is
[enumGio.ZlibCompressorFormat.GZIP].

Returns:

#file_info=(file_info) ⇒ Gio::FileInfo

A [classGio.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
[propertyGio.ZlibCompressor:format] is
[enumGio.ZlibCompressorFormat.GZIP].

Parameters:

Returns:

#format ⇒ Gio::ZlibCompressorFormat

The format of the compressed data.

Returns:

#format=(format) ⇒ Gio::ZlibCompressorFormat

The format of the compressed data.

Parameters:

Returns:

#level ⇒ Integer

The level of compression from 0 (no compression) to 9 (most
compression).

-1 for the default level.

Returns:

  • (Integer) —

    level

#level=(level) ⇒ Integer

The level of compression from 0 (no compression) to 9 (most
compression).

-1 for the default level.

Parameters:

  • level (Integer)

Returns:

  • (Integer) —

    level

  • (Integer) —

    level

#os ⇒ Integer

The OS code of the gzip header.

This will be used if set to a non-negative value, and if
[propertyGio.ZlibCompressor:format] is
[enumGio.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.

Returns:

  • (Integer) —

    os

#os=(os) ⇒ Integer

The OS code of the gzip header.

This will be used if set to a non-negative value, and if
[propertyGio.ZlibCompressor:format] is
[enumGio.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.

Parameters:

  • os (Integer)

Returns:

  • (Integer) —

    os

  • (Integer) —

    os