Class ZlibCompressor

All Implemented Interfaces:
Converter, Proxy

@Generated("org.javagi.JavaGI") public class ZlibCompressor extends GObject implements Converter
GZlibCompressor is an implementation of Converter that compresses data using zlib.
  • Constructor Details

    • ZlibCompressor

      public ZlibCompressor(MemorySegment address)
      Create a ZlibCompressor instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • ZlibCompressor

      public ZlibCompressor(ZlibCompressorFormat format, int level)
      Creates a compressor.
      Parameters:
      format - the format to use for the compressed data
      level - compression level (0-9), -1 for default
      Since:
      2.24
    • ZlibCompressor

      public ZlibCompressor()
      Create a new ZlibCompressor.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the ZlibCompressor class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected ZlibCompressor asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class GObject
      Returns:
      the instance as if it were its parent type
    • getFileInfo

      public @Nullable FileInfo getFileInfo()
      Gets the Gio.ZlibCompressor:file-info property.
      Returns:
      file info for the gzip header, if set
      Since:
      2.26
    • getOs

      public int getOs()
      Gets the Gio.ZlibCompressor:os property.
      Returns:
      the previously set OS value, or -1 if unset
      Since:
      2.86
    • setFileInfo

      public void setFileInfo(@Nullable FileInfo fileInfo)

      Sets the 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 Converter.reset().

      Parameters:
      fileInfo - file info for the gzip header
      Since:
      2.26
    • setOs

      public void setOs(int os)

      Sets the 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 Converter.reset().

      Parameters:
      os - the OS code to use, or -1 to unset
      Since:
      2.86
    • builder

      public static ZlibCompressor.Builder<? extends ZlibCompressor.Builder> builder()
      A ZlibCompressor.Builder object constructs a ZlibCompressor with the specified properties. Use the various set...() methods to set properties, and finish construction with ZlibCompressor.Builder.build().
      Returns:
      the builder object