1from abc
import ABC, abstractmethod
2from typing
import TextIO
4from ids_peak_common.serialization.iarchive
import IArchive
10 Interface for deserializing structured data from an input stream into an archive.
12 This interface defines the contract for reconstructing archive objects
13 from serialized representations stored in a file, buffer, or other input source.
15 @ingroup ids_peak_common_python_serialization
17 @since ids_peak_common 1.1
21 def read(self, stream: TextIO) -> IArchive:
24 Deserializes data from the specified input stream into an archive.
26 This method reads raw data from the provided input stream and converts it
27 into a structured :class:`IArchive` object. The stream must be open, valid,
28 and ready for reading before this function is called.
30 @param stream: The input stream to read from.
31 It should point to the beginning of a valid archive format.
32 @return A deserialized IArchive instance.
34 @since ids_peak_common 1.1
Interface for deserializing structured data from an input stream into an archive.
IArchive read(self, TextIO stream)
Deserializes data from the specified input stream into an archive.