#NEWLINE# def read_document( stream , repair = False ) : #NEWLINE# #INDENT# name = read_string ( stream ) #NEWLINE# assert ( stream . read ( 1 ) == b'\x01' ) #NEWLINE# version = struct . unpack ( '>i' , stream . read ( 4 ) ) [ 0 ] #NEWLINE# data = read_dynamic ( stream , repair ) #NEWLINE# return Document ( name , version , data )