#NEWLINE# def load_chunk( filename , bounds , encoding = 'utf8' , slow = False ) : #NEWLINE# #INDENT# "\n    Load a chunk from file using Bounds info.\n    Pass 'slow=True' for an alternative loading method based on line numbers.\n    " #NEWLINE# if slow : #NEWLINE# #INDENT# return _load_chunk_slow ( filename , bounds , encoding ) #NEWLINE# #UNINDENT# with open ( filename , 'rb' ) as f : #NEWLINE# #INDENT# f . seek ( bounds . byte_start ) #NEWLINE# size = ( bounds . byte_end - bounds . byte_start ) #NEWLINE# return f . read ( size ) . decode ( encoding )