### Function

# FwupdPlugin input_stream_read_safe

#### Declaration [src]

    gboolean
    fu_input_stream_read_safe (
      GInputStream* stream,
      guint8* buf,
      gsize bufsz,
      gsize offset,
      gsize seek_set,
      gsize count,
      GError** error
    )

#### Description [src]

Tries to read count bytes from the stream into the buffer starting at `buf`.

Available since: | 2.0.0

#### Parameters

`stream` | `GInputStream`
| A `GInputStream` `buf` (not nullable): a buffer to read data into.
| The data is owned by the caller of the function.
`buf` | `guint8*`
| No description available.
| The data is owned by the caller of the function.
`bufsz` | `gsize`
| Size of `buf`.
`offset` | `gsize`
| Offset in bytes into `buf` to copy from.
`seek_set` | `gsize`
| Given offset to seek to.
`count` | `gsize`
| The number of bytes that will be read from the stream.
`error` | `GError **`
| The return location for a `GError*`, or `NULL`.

#### Return value

Returns: | `gboolean`
| `TRUE` for success.