def METHOD_NAME(infile, outfile, opts):
    # read input file and store content in little endian bitarray
    input_bits = bitarray(0, 'little')
    with open(infile, "rb") as fi:
        input_bits.fromfile(fi)
    # gunzip: the output is accumulated in a bytearray
    output = bytearray()
    d = GunZip(input_bits, output)
    d.read_header(verbose=opts.verbose)
    stats = d.process_blocks(print_dot if opts.progress else None)
    d.check_footer(output)
    if opts.progress:
        sys.stdout.write('\n')
    if opts.stats:
        pprint(stats)
    # write output to file
    with open(outfile, "wb") as fo:
        fo.write(output)