#NEWLINE# def __init__( self , filename , manager ) : #NEWLINE# #INDENT# 'Construct the data provider. _mmap refers to the memory map, and _pmap \n        refers to the numpy point map.' #NEWLINE# self . filename = filename #NEWLINE# self . fileref = False #NEWLINE# self . _mmap = False #NEWLINE# self . _pmap = False #NEWLINE# self . _evlrmap = False #NEWLINE# self . manager = manager #NEWLINE# self . mode = manager . mode #NEWLINE# if ( self . mode in 'w' ) : #NEWLINE# #INDENT# self . compressed = False #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# tmpref = open ( filename , 'rb' ) #NEWLINE# tmpref . seek ( 104 ) #NEWLINE# fmt = int ( struct . unpack ( '<B' , tmpref . read ( 1 ) ) [ 0 ] ) #NEWLINE# compression_bit_7 = ( ( fmt & 128 ) >> 7 ) #NEWLINE# compression_bit_6 = ( ( fmt & 64 ) >> 6 ) #NEWLINE# if ( ( not compression_bit_6 ) and fmt ) : #NEWLINE# #INDENT# self . compressed = True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . compressed = False #NEWLINE# #UNINDENT# tmpref . close ( ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# raise laspy . util . LaspyException ( ( 'Error determining compression: ' + str ( e ) ) )