docs: def nii_gzip(imfile, outpath=''):
      '''Compress *.gz file'''
      import gzip
      with open(imfile, 'rb') as f:
          d = f.read()
      # Now store the compressed data
      if outpath=='':
          fout = imfile+'.gz'
      else:
          fout = os.path.join(outpath, os.path.basename(imfile)+'.gz')
      # store compressed file data from 'd' variable
      with gzip.open(fout, 'wb') as f:
          f.write(d)
      return fout