BlobStream¶
- class dsviper.BlobStream¶
Bases:
objectThe handle on a blob being written to a database past 2 GB, in chunks.
It reports where the write stands - offset, remaining, is_closed - and its blob_id once blob_stream_close has closed it. It moves nothing itself: blob_stream_create, blob_stream_append and blob_stream_close, on a CommitDatabase or a Database, do the writing.
Note: Not directly instantiable.
- blob_id() ValueBlobId¶
Return the ValueBlobId of the written blob.
It is computed from the blob’s layout and every byte appended. Raise while the stream is open: the hash is only complete once every byte has been written.
- is_closed() bool¶
Return True if the stream is closed.
- offset() int¶
Return the current offset.
- remaining() int¶
Return the remaining bytes count to fill the blob.