#NEWLINE# def get_blocks_byte_array( self , buffer = False ) : #NEWLINE# #INDENT# 'Return a list of all blocks in this chunk.' #NEWLINE# if buffer : #NEWLINE# #INDENT# length = len ( self . blocksList ) #NEWLINE# return BytesIO ( ( pack ( '>i' , length ) + self . get_blocks_byte_array ( ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return array . array ( 'B' , self . blocksList ) . tostring ( )