def METHOD_NAME(fname, chp, append=False):
    '''
    Export binary ls1 checkpoint (representation: dict of lists)
    :param string fname: Path and name of target
    :param chp: Checkpoint to be exported
    :param bool append: Specify if data should be appended to existing file; Default: False
    '''
    if append:
        writeMode = 'ab'
    else:
        writeMode = 'wb'
    numParticles=len(chp['pid'])
    #print('numParticles=',numParticles)
    with open(fname, writeMode) as f:
        ba=bytearray()
        for pi in range(numParticles):
            ba.extend(pack('<Q',chp['pid'][pi]))
            ba.extend(pack('<I',chp['cid'][pi]))
            ba.extend(pack('<d',chp['rx'][pi]))
            ba.extend(pack('<d',chp['ry'][pi]))
            ba.extend(pack('<d',chp['rz'][pi]))
            ba.extend(pack('<d',chp['vx'][pi]))
            ba.extend(pack('<d',chp['vy'][pi]))
            ba.extend(pack('<d',chp['vz'][pi]))
            ba.extend(pack('<d',chp['q0'][pi]))
            ba.extend(pack('<d',chp['q1'][pi]))
            ba.extend(pack('<d',chp['q2'][pi]))
            ba.extend(pack('<d',chp['q3'][pi]))
            ba.extend(pack('<d',chp['Dx'][pi]))
            ba.extend(pack('<d',chp['Dy'][pi]))
            ba.extend(pack('<d',chp['Dz'][pi]))
        f.write(ba)