def serve_file(load, fnd):
    ret = {'data': '', 'dest': ''}
    if not fnd['path']:
        return ret
    ret['dest'] = fnd['rel']
    gzip = load.get('gzip', None)

    # AP
    # May I sleep here to slow down serving of big files?
    # How many threads are serving files?
    with salt.utils.fopen(fnd['path'], 'rb') as fp_:
        fp_.seek(load['loc'])
        data = fp_.read(__opts__['file_buffer_size'])
        if gzip and data:
            data = salt.utils.gzip_util.compress(data, gzip)
            ret['gzip'] = gzip
        ret['data'] = data
    return ret
Returns the internal only pb representation.
dataset/ETHPy150Open saltstack/salt/salt/fileserver/minionfs.py/serve_file--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/datastore/datastore_query.py/CompositeFilter._to_pbs