Skip to content
Back to top
View this page

# ValueOpcode

class dsviper.ValueOpcode

  Bases: `object`

  A utility class to handle opcodes encoder and streamer.

  Note: Not directly instantiable.

  static decode(blob: ValueBlob, definitions: DefinitionsConst, *, stream_codec_instancing: StreamCodecInstancing | None = None) → list[ValueOpcode]

    Return a list of opcodes by decoding the blob with a StreamBinaryCodec if not specified. .

  static encode(opcodes: list[ValueOpcode], *, stream_codec_instancing: StreamCodecInstancing | None = None) → ValueBlob

    Return a blob that encodes the list of opcodes with a StreamBinaryCodec if not specified.

  static read(stream_reading: StreamReading, definitions: DefinitionsConst) → list[ValueOpcode]

    Read and return the list of opcodes from the stream.

  static write(opcodes: list[ValueOpcode], stream_writing: StreamWriting) → None

    Write the list of opcodes to the stream.