code: def serve_file(load, fnd):
      '''
      Return a chunk from a file based on the data received
      '''
      if 'env' in load:
          # "env" is not supported; Use "saltenv".
          load.pop('env')
  
      ret = {'data': '',
             'dest': ''}
      if 'path' not in load or 'loc' not in load or 'saltenv' not in load:
          return ret
      if not fnd['path']:
          return ret
      ret['dest'] = fnd['rel']
      gzip = load.get('gzip', None)
      fpath = os.path.normpath(fnd['path'])
      with salt.utils.files.fopen(fpath, '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 ref serve_file(load, fnd):
      '''
      Return a chunk from a file based on the data received
      '''
      if 'env' in load:
          # "env" is not supported; Use "saltenv".
          load.pop('env')
  
      ret = {'data': '',
             'dest': ''}
      if 'path' not in load or 'loc' not in load or 'saltenv' not in load:
          return ret
      if not fnd['path']:
          return ret
      ret['dest'] = fnd['rel']
      gzip = load.get('gzip', None)
      fpath = os.path.normpath(fnd['path'])
      with salt.utils.files.fopen(fpath, '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
docs: Return a chunk from a file based on the data received