dynamodb_encryption_sdk.internal.formatting.deserialize

Helper functions for deserializing values.

Warning

No guarantee is provided on the modules and APIs within this namespace staying consistent. Directly reference at your own risk.

Functions

decode_byte(stream)

Decode a single raw byte from a serialized stream (used for deserialize bool).

decode_length(stream)

Decode the length of a value from a serialized stream.

decode_tag(stream)

Decode a tag value from a serialized stream.

decode_value(stream)

Decode the contents of a value from a serialized stream.

unpack_value(format_string, stream)

Helper function to unpack struct data from a stream and update the signature verifier.

dynamodb_encryption_sdk.internal.formatting.deserialize.unpack_value(format_string, stream)[source]

Helper function to unpack struct data from a stream and update the signature verifier.

Parameters
  • format_string (str) – Struct format string

  • stream (io.BytesIO) – Source data stream

Returns

Unpacked values

Return type

tuple

dynamodb_encryption_sdk.internal.formatting.deserialize.decode_length(stream)[source]

Decode the length of a value from a serialized stream.

Parameters

stream (io.BytesIO) – Source data stream

Returns

Decoded length

Return type

int

dynamodb_encryption_sdk.internal.formatting.deserialize.decode_value(stream)[source]

Decode the contents of a value from a serialized stream.

Parameters

stream (io.BytesIO) – Source data stream

Returns

Decoded value

Return type

bytes

dynamodb_encryption_sdk.internal.formatting.deserialize.decode_tag(stream)[source]

Decode a tag value from a serialized stream.

Parameters

stream (io.BytesIO) – Source data stream

Returns

Decoded tag

Return type

bytes