### Class

# Vips SourceGInputStream

#### Description

    class Vips.SourceGInputStream : Vips.Source
    {
      /* No available fields */
    }

No description available.

#### Ancestors

- VipsSource
- VipsConnection
- VipsObject
- GObject

#### Constructors

###### vips_source_g_input_stream_new

Create a `VipsSourceGInputStream` which wraps `stream`.

#### Instance methods

##### Methods inherited from VipsSource (13)

###### vips_source_decode

Signal the end of header read and the start of the pixel decode phase. After this, you can no longer seek on this source.

###### vips_source_is_file

Test if this source is a simple file with support for seek. Named pipes, for example, will fail this test. If `TRUE`, you can use `vips_connection_filename()` to find the filename.

###### vips_source_is_mappable

Some sources can be efficiently mapped into memory. You can still use `vips_source_map()` if this function returns `FALSE`, but it will be slow.

###### vips_source_length

Return the length in bytes of the source. Unseekable sources, for example pipes, will have to be read entirely into memory before the length can be found, so this operation can take a long time.

###### vips_source_map

Map the source entirely into memory and return a pointer to the start. If `length` is non-NULL, the source size is written to it.

###### vips_source_map_blob

Just like `vips_source_map()`, but return a `VipsBlob` containing the pointer. `source` will stay alive as long as the result is alive.

###### vips_source_minimise

Minimise the source. As many resources as can be safely removed are removed. Use `vips_source_unminimise()` to restore the source if you wish to use it again.

###### vips_source_read

Read up to `length` bytes from `source` and store the bytes in `buffer`. Return the number of bytes actually read. If all bytes have been read from the file, return 0.

###### vips_source_rewind

Rewind the source to the start.

###### vips_source_seek

Move the file read position. You can’t call this after pixel decode starts. The arguments are exactly as `lseek()`.

###### vips_source_sniff

Return a pointer to the first few bytes of the file. If the file is too short, return `NULL`.

###### vips_source_sniff_at_most

Attempt to sniff at most `length` bytes from the start of the source. A pointer to the bytes is returned in `data`. The number of bytes actually read is returned — it may be less than `length` if the file is shorter than `length`. A negative number indicates a read error.

###### vips_source_unminimise

Restore the source after minimisation. This is called at the start of every source method, so loaders should not usually need this.

##### Methods inherited from VipsConnection (2)

###### vips_connection_filename

No description available.

###### vips_connection_nick

No description available.

##### Methods inherited from VipsObject (27)

Please see VipsObject for a full list of methods.

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

Please see GObject for a full list of methods.

#### Properties

###### Vips.SourceGInputStream:stream

No description available.

##### Properties inherited from VipsSource (1)

###### Vips.Source:blob

No description available.

##### Properties inherited from VipsConnection (2)

###### Vips.Connection:descriptor

No description available.

###### Vips.Connection:filename

No description available.

##### Properties inherited from VipsObject (2)

###### Vips.Object:description

No description available.

###### Vips.Object:nickname

No description available.

#### Signals

##### Signals inherited from VipsObject (4)

###### VipsObject::close

The ::close signal is emitted once during object close. The object is dying and may not work.

###### VipsObject::postbuild

The ::postbuild signal is emitted once just after successful object construction. Return non-zero to cause object construction to fail.

###### VipsObject::postclose

The ::postclose signal is emitted once after object close. The object pointer is still valid, but nothing else.

###### VipsObject::preclose

The ::preclose signal is emitted once just before object close starts. The object is still alive.

##### 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 VipsSourceGInputStreamClass {
      VipsSourceClass parent_class;

    }

No description available.

###### Class members

`parent_class: VipsSourceClass`

  No description available.