def make_virtual_offset(block_start_offset, within_block_offset):
 if ((within_block_offset < 0) or (within_block_offset >= 65536)):
  raise ValueError(('Require 0 <= within_block_offset < 2**16, got %i' % within_block_offset))
 if ((block_start_offset < 0) or (block_start_offset >= 281474976710656)):
  raise ValueError(('Require 0 <= block_start_offset < 2**48, got %i' % block_start_offset))
 return ((block_start_offset << 16) | within_block_offset)

def make_virtual_offset ( block_start_offset , within_block_offset ) : if ( ( within_block_offset < 0 ) or ( within_block_offset >= 65536 ) ) : raise ValueError ( ( 'Require 0 <= within_block_offset < 2**16, got %i' % within_block_offset ) ) if ( ( block_start_offset < 0 ) or ( block_start_offset >= 281474976710656 ) ) : raise ValueError ( ( 'Require 0 <= block_start_offset < 2**48, got %i' % block_start_offset ) ) return ( ( block_start_offset << 16 ) | within_block_offset )
compute a bgzf virtual offset from block start and within block offsets .