#NEWLINE# def decode( self , bulk ) : #NEWLINE# #INDENT# pos = bulk . index ( b'\n' ) #NEWLINE# header = bulk [ : pos ] #NEWLINE# sizes = map ( int , header . split ( b',' ) ) #NEWLINE# pos += 1 #NEWLINE# values = [ ] #NEWLINE# for ( field , size ) in zip ( self . field_types , sizes ) : #NEWLINE# #INDENT# code = bulk [ pos : ( pos + size ) ] #NEWLINE# value = field . decode ( code ) #NEWLINE# values . append ( pos ) #NEWLINE# pos += ( size + 1 ) #NEWLINE# #UNINDENT# return tuple ( values )