git_odb_open_rstream

Open a stream to read an object from the ODB

Note that most backends do *not* support streaming reads because they store their objects as compressed/delta'ed blobs.

It's recommended to use git_odb_read instead, which is assured to work on all backends.

The returned stream will be of type git_odb_stream_t.GIT_STREAM_RDONLY and will have the following methods:

- stream->read: read n bytes from the stream - stream->free: free the stream

The stream must always be free'd or will leak memory.

@see git_odb_stream

Parameters

out_ libgit2_d.types.git_odb_stream**

pointer where to store the stream

len size_t*

pointer where to store the length of the object

type libgit2_d.types.git_object_t*

pointer where to store the type of the object

db libgit2_d.types.git_odb*

object database where the stream will read from

oid const(libgit2_d.oid.git_oid)*

oid of the object the stream will read from

Return Value

Type: int

0 if the stream was created; error code otherwise

Meta