def __init__( self, offset=Chain(), default=None, count=None, length=None, stream=False,
                    alignment=1, stream_end=None, stop_check=None, **kwargs ):
        """Base class for accessing one or more streamable elements.

        offset
            Position of data, relative to the start of the parent block. Defaults to
            the end offset of the previous field.

        default
            Default value to emit in the case of e.g. creating an empty Block.

        count
            Load multiple elements. None implies a single value, non-negative
            numbers will return a Python list.

        length
            Maximum size of the buffer to read in.

        stream
            Read elements continuously until a stop condition is met. Defaults to False.

        alignment
            Number of bytes to align the start of each element to.

        stream_end
            Byte pattern to denote the end of the stream.

        stop_check
            A function that takes a data buffer and an offset; should return True if
            the end of the data stream has been reached and False otherwise.
        """
        if count is not None and default is None:
            default = []
        super().__init__( default=default, **kwargs )
        self.offset = offset
        self.count = count
        self.length = length
        self.stream = stream
        self.alignment = alignment
        if stream_end is not None:
            assert common.is_bytes( stream_end )
        self.stream_end = stream_end
        self.stop_check = stop_check
def __init__ ( self , offset = Chain ( ) , default = None , count = None , length = None , stream = False , alignment = 1 , stream_end = None , stop_check = None , ** kwargs ) : if count is not None and default is None : default = [ ] super ( ) . __init__ ( default = default , ** kwargs ) self . offset = offset self . count = count self . length = length self . stream = stream self . alignment = alignment if stream_end is not None : assert common . is_bytes ( stream_end ) self . stream_end = stream_end self . stop_check = stop_check
Base class for accessing one or more streamable elements.

        offset
            Position of data, relative to the start of the parent block. Defaults to
            the end offset of the previous field.

        default
            Default value to emit in the case of e.g. creating an empty Block.

        count
            Load multiple elements. None implies a single value, non-negative
            numbers will return a Python list.

        length
            Maximum size of the buffer to read in.

        stream
            Read elements continuously until a stop condition is met. Defaults to False.

        alignment
            Number of bytes to align the start of each element to.

        stream_end
            Byte pattern to denote the end of the stream.

        stop_check
            A function that takes a data buffer and an offset; should return True if
            the end of the data stream has been reached and False otherwise.