gi-gio-2.0.38: Gio bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gio.Objects.ZlibCompressor

Contents

- Exported types
- Methods
  - getFileInfo
  - getOs
  - new
  - setFileInfo
  - setOs
- Properties
  - fileInfo
  - format
  - level
  - os

Description

`GZlibCompressor` is an implementation of `Converter` that compresses data using zlib.

Synopsis

- newtype ZlibCompressor = ZlibCompressor (ManagedPtr ZlibCompressor)
- class (GObject o, IsDescendantOf ZlibCompressor o) => IsZlibCompressor o
- toZlibCompressor :: (MonadIO m, IsZlibCompressor o) => o -> m ZlibCompressor
- zlibCompressorGetFileInfo :: (HasCallStack, MonadIO m, IsZlibCompressor a) => a -> m (Maybe FileInfo)
- zlibCompressorGetOs :: (HasCallStack, MonadIO m, IsZlibCompressor a) => a -> m Int32
- zlibCompressorNew :: (HasCallStack, MonadIO m) => ZlibCompressorFormat -> Int32 -> m ZlibCompressor
- zlibCompressorSetFileInfo :: (HasCallStack, MonadIO m, IsZlibCompressor a, IsFileInfo b) => a -> Maybe b -> m ()
- zlibCompressorSetOs :: (HasCallStack, MonadIO m, IsZlibCompressor a) => a -> Int32 -> m ()
- clearZlibCompressorFileInfo :: (MonadIO m, IsZlibCompressor o) => o -> m ()
- constructZlibCompressorFileInfo :: (IsZlibCompressor o, MonadIO m, IsFileInfo a) => a -> m (GValueConstruct o)
- getZlibCompressorFileInfo :: (MonadIO m, IsZlibCompressor o) => o -> m (Maybe FileInfo)
- setZlibCompressorFileInfo :: (MonadIO m, IsZlibCompressor o, IsFileInfo a) => o -> a -> m ()
- constructZlibCompressorFormat :: (IsZlibCompressor o, MonadIO m) => ZlibCompressorFormat -> m (GValueConstruct o)
- getZlibCompressorFormat :: (MonadIO m, IsZlibCompressor o) => o -> m ZlibCompressorFormat
- constructZlibCompressorLevel :: (IsZlibCompressor o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getZlibCompressorLevel :: (MonadIO m, IsZlibCompressor o) => o -> m Int32
- constructZlibCompressorOs :: (IsZlibCompressor o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getZlibCompressorOs :: (MonadIO m, IsZlibCompressor o) => o -> m Int32
- setZlibCompressorOs :: (MonadIO m, IsZlibCompressor o) => o -> Int32 -> m ()

# Exported types

newtype ZlibCompressor Source #

Memory-managed wrapper type.

Constructors

ZlibCompressor (ManagedPtr ZlibCompressor) |

#### Instances

Instances details

Eq ZlibCompressor Source # |
Instance details Defined in GI.Gio.Objects.ZlibCompressor Methods (==) :: ZlibCompressor -> ZlibCompressor -> Bool Source # (/=) :: ZlibCompressor -> ZlibCompressor -> Bool Source #
GObject ZlibCompressor Source # |
Instance details Defined in GI.Gio.Objects.ZlibCompressor
ManagedPtrNewtype ZlibCompressor Source # |
Instance details Defined in GI.Gio.Objects.ZlibCompressor Methods toManagedPtr :: ZlibCompressor -> ManagedPtr ZlibCompressor Source #
TypedObject ZlibCompressor Source # |
Instance details Defined in GI.Gio.Objects.ZlibCompressor Methods glibType :: IO GType Source #
HasParentTypes ZlibCompressor Source # |
Instance details Defined in GI.Gio.Objects.ZlibCompressor
IsGValue (Maybe ZlibCompressor) Source # | Convert `ZlibCompressor` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gio.Objects.ZlibCompressor Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe ZlibCompressor -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe ZlibCompressor) Source #
type ParentTypes ZlibCompressor Source # |
Instance details Defined in GI.Gio.Objects.ZlibCompressor type ParentTypes ZlibCompressor = '[Object, Converter]

class (GObject o, IsDescendantOf ZlibCompressor o) => IsZlibCompressor o Source #

Type class for types which can be safely cast to `ZlibCompressor`, for instance with `toZlibCompressor`.

#### Instances

Instances details

(GObject o, IsDescendantOf ZlibCompressor o) => IsZlibCompressor o Source # |
Instance details Defined in GI.Gio.Objects.ZlibCompressor

toZlibCompressor :: (MonadIO m, IsZlibCompressor o) => o -> m ZlibCompressor Source #

Cast to `ZlibCompressor`, for types for which this is known to be safe. For general casts, use `castTo`.

# Methods

### Click to display all available methods, including inherited ones

Expand

#### Methods

bindProperty, bindPropertyFull, convert, convertBytes, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, reset, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.

#### Getters

getData, getFileInfo, getOs, getProperty, getQdata.

#### Setters

setData, setDataFull, setFileInfo, setOs, setProperty.

## getFileInfo

zlibCompressorGetFileInfo Source #

Arguments

:: (HasCallStack, MonadIO m, IsZlibCompressor a) |
=> a | `compressor`: a compressor
-> m (Maybe FileInfo) | Returns: file info for the gzip header, if set

Gets the ZlibCompressor:fileInfo property.

Since: 2.26

## getOs

zlibCompressorGetOs Source #

Arguments

:: (HasCallStack, MonadIO m, IsZlibCompressor a) |
=> a | `compressor`: a compressor
-> m Int32 | Returns: the previously set OS value, or `-1` if unset

Gets the ZlibCompressor:os property.

Since: 2.86

## new

zlibCompressorNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ZlibCompressorFormat | `format`: the format to use for the compressed data
-> Int32 | `level`: compression level (`0`-`9`), `-1` for default
-> m ZlibCompressor | Returns: a new `ZlibCompressor`

Creates a compressor.

Since: 2.24

## setFileInfo

zlibCompressorSetFileInfo Source #

Arguments

:: (HasCallStack, MonadIO m, IsZlibCompressor a, IsFileInfo b) |
=> a | `compressor`: a compressor
-> Maybe b | `fileInfo`: file info for the gzip header
-> m () |

Sets the ZlibCompressor:fileInfo 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 `converterReset`.

Since: 2.26

## setOs

zlibCompressorSetOs Source #

Arguments

:: (HasCallStack, MonadIO m, IsZlibCompressor a) |
=> a | `compressor`: a compressor
-> Int32 | `os`: the OS code to use, or `-1` to unset
-> m () |

Sets the 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 `converterReset`.

Since: 2.86

# Properties

## fileInfo

A `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 ZlibCompressor:format is `ZlibCompressorFormatGzip`.

Since: 2.26

clearZlibCompressorFileInfo :: (MonadIO m, IsZlibCompressor o) => o -> m () Source #

Set the value of the “`file-info`” property to `Nothing`. When overloading is enabled, this is equivalent to

    clear #fileInfo

constructZlibCompressorFileInfo :: (IsZlibCompressor o, MonadIO m, IsFileInfo a) => a -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`file-info`” property. This is rarely needed directly, but it is used by `new`.

getZlibCompressorFileInfo :: (MonadIO m, IsZlibCompressor o) => o -> m (Maybe FileInfo) Source #

Get the value of the “`file-info`” property. When overloading is enabled, this is equivalent to

    get zlibCompressor #fileInfo

setZlibCompressorFileInfo :: (MonadIO m, IsZlibCompressor o, IsFileInfo a) => o -> a -> m () Source #

Set the value of the “`file-info`” property. When overloading is enabled, this is equivalent to

    set zlibCompressor [ #fileInfo := value ]

## format

The format of the compressed data.

Since: 2.24

constructZlibCompressorFormat :: (IsZlibCompressor o, MonadIO m) => ZlibCompressorFormat -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`format`” property. This is rarely needed directly, but it is used by `new`.

getZlibCompressorFormat :: (MonadIO m, IsZlibCompressor o) => o -> m ZlibCompressorFormat Source #

Get the value of the “`format`” property. When overloading is enabled, this is equivalent to

    get zlibCompressor #format

## level

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

`-1` for the default level.

Since: 2.24

constructZlibCompressorLevel :: (IsZlibCompressor o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`level`” property. This is rarely needed directly, but it is used by `new`.

getZlibCompressorLevel :: (MonadIO m, IsZlibCompressor o) => o -> m Int32 Source #

Get the value of the “`level`” property. When overloading is enabled, this is equivalent to

    get zlibCompressor #level

## os

The OS code of the gzip header.

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

Since: 2.86

constructZlibCompressorOs :: (IsZlibCompressor o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`os`” property. This is rarely needed directly, but it is used by `new`.

getZlibCompressorOs :: (MonadIO m, IsZlibCompressor o) => o -> m Int32 Source #

Get the value of the “`os`” property. When overloading is enabled, this is equivalent to

    get zlibCompressor #os

setZlibCompressorOs :: (MonadIO m, IsZlibCompressor o) => o -> Int32 -> m () Source #

Set the value of the “`os`” property. When overloading is enabled, this is equivalent to

    set zlibCompressor [ #os := value ]