def parse_field_value(self, value: Optional[Union[bytes, dict]]) -> dict:
        """
        Parse provided binary field value and return parsed value (dictionary).

        For example:

            - (n, o, ...) - no compression, data is serialized using orjson
            - (z, o, ...) - zstandard compression, data is serialized using orjson
        """
        if not value:
            return self.default

        if isinstance(value, dict):
            # Already deserializaed
            return value

        if not self.use_header:
            return orjson.loads(value)

        split = value.split(JSON_DICT_FIELD_DELIMITER, 2)

        if len(split) != 3:
            raise ValueError(
                "Expected 3 values when splitting field value, got %s" % (len(split))
            )

        compression_algorithm = split[0]
        serialization_format = split[1]
        data = split[2]

        if compression_algorithm not in VALID_JSON_DICT_COMPRESSION_ALGORITHMS:
            raise ValueError(
                "Invalid or unsupported value for compression algorithm header "
                "value: %s" % (compression_algorithm)
            )

        if serialization_format not in VALID_JSON_DICT_SERIALIZATION_FORMATS:
            raise ValueError(
                "Invalid or unsupported value for serialization format header "
                "value: %s" % (serialization_format)
            )

        if (
            compression_algorithm
            == JSONDictFieldCompressionAlgorithmEnum.ZSTANDARD.value
        ):
            # NOTE: At this point zstandard is only test dependency
            import zstandard

            data = zstandard.ZstdDecompressor().decompress(data)

        data = orjson.loads(data)
        return data

        Parse provided binary field value and return parsed value (dictionary).

        For example:

            - (n, o, ...) - no compression, data is serialized using orjson
            - (z, o, ...) - zstandard compression, data is serialized using orjson
        
st2common/st2common/fields.py