peek_buffer =========== .. py:function:: pride.utils.peek_buffer(buffer: bytes, contents_format: str, start: int) -> tuple[list[Any], int] Read and decode a sequence of bytes from a buffer Starting from the `start` position, reads a portion of the buffer, and decodes it according to the format string. The amount of bytes to read is calculated automatically from the format string. The function returns the decoded contents, and the updated position from which to keep reading the buffer. :param buffer: Buffer of bytes to read from :param contents_format: Format string to decode the bytes :param start: Position from which to start reading the buffer :return contents: Decoded contents :return current_byte: Updated position from which to keep reading the buffer :raises BufferError: If it is not possible to calculate the number of bytes to read from the format string :raises BufferError: If the sum of the start position, and the calculated number of bytes to read is greater than the size of the buffer