#NEWLINE# def _AlignDecryptedDataOffset( self , decrypted_data_offset ) : #NEWLINE# #INDENT# 'Aligns the encrypted file with the decrypted data offset.\n\n    Args:\n      decrypted_data_offset: the decrypted data offset.\n    ' #NEWLINE# self . _file_object . seek ( 0 , os . SEEK_SET ) #NEWLINE# self . _decrypter = self . _GetDecrypter ( ) #NEWLINE# self . _decrypted_data = b'' #NEWLINE# encrypted_data_offset = 0 #NEWLINE# encrypted_data_size = self . _file_object . get_size ( ) #NEWLINE# while ( encrypted_data_offset < encrypted_data_size ) : #NEWLINE# #INDENT# read_count = self . _ReadEncryptedData ( self . _ENCRYPTED_DATA_BUFFER_SIZE ) #NEWLINE# if ( read_count == 0 ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# encrypted_data_offset += read_count #NEWLINE# if ( decrypted_data_offset < self . _decrypted_data_size ) : #NEWLINE# #INDENT# self . _decrypted_data_offset = decrypted_data_offset #NEWLINE# break #NEWLINE# #UNINDENT# decrypted_data_offset -= self . _decrypted_data_size