Skip to content
Back to top
View this page

# StreamEncoding

class dsviper.StreamEncoding

  Bases: `object`

  An interface used to write data to a blob.

  Note: Not directly instantiable.

  end_encoding() → ValueBlob

    Return the blob and set the flag ended to True.

  is_ended() → bool

    Return True if the stream is ended.

  stream_writing() → StreamWriting

    Return a StreamWriting interface.

  write_blob(value: ValueBlob) → None

    Write a blob.

  write_blob_id(value: ValueBlobId) → None

    Write a blob_id.

  write_bool(value: bool) → None

    Write a bool.

  write_commit_id(value: ValueCommitId) → None

    Write a commit_id.

  write_double(value: float) → None

    Write a double.

  write_doubles(value: Sequence | ValueVec, size: int) → None

    Write an array of double.

  write_float(value: float) → None

    Write a float.

  write_floats(value: Sequence | ValueVec, size: int) → None

    Write an array of float.

  write_int16(value: int) → None

    Write an int16.

  write_int16s(value: Sequence | ValueVec, size: int) → None

    Write an array of int16.

  write_int32(value: int) → None

    Write an int32.

  write_int32s(value: Sequence | ValueVec, size: int) → None

    Write an array of int32.

  write_int64(value: int) → None

    Write an int64.

  write_int64s(value: Sequence | ValueVec, size: int) → None

    Write an array of int64.

  write_int8(value: int) → None

    Write an int8.

  write_int8s(value: Sequence | ValueVec, size: int) → None

    Write an array of int8.

  write_string(value: str) → None

    Write a string.

  write_uint16(value: int) → None

    Write an uint16.

  write_uint16s(value: Sequence | ValueVec, size: int) → None

    Write an array of uint16.

  write_uint32(value: int) → None

    Write an uint32.

  write_uint32s(value: Sequence | ValueVec, size: int) → None

    Write an array of uint32.

  write_uint64(value: int) → None

    Write an uint64.

  write_uint64s(value: Sequence | ValueVec, size: int) → None

    Write an array of uint64.

  write_uint8(value: int) → None

    Write an uint8.

  write_uint8s(value: Sequence | ValueVec, size: int) → None

    Write an array of uint8.

  write_uuid(value: ValueUUId) → None

    Write an uuid.