A smaller number, larger wire will handle more amperage without voltage loss. As long as the 12 gauge cord you buy is really 12 gauge and not some cheap import that doesn't meet specs, and as long as the ends are good quality, it will be fine. You can buy 10 gauge cords with 15/20 amp 125 volt ends as well and bigger doesn't hurt, but it will be heavier and more expensive.
I had a 50 foot 10 gauge cord for my miller 135 mig, but later turned it into a 240/250v cord for my plasma and miller 211. 10 gauge is good for 30 amps, if the ends are correct. RV 14-30 plugs and receptacles as well as some twist locks are rated that high. I used 6-50 (common welding plugs/receptacles) for my cords, which are 50 amp, but the 10 ga limits them to 30 amp use. Yes, this likely isn't to code, but I understand electricity and have done plenty of it professionally.
Along with a couple 10 cords setup for 6-50, I also have a 6 gauge for the 65 amp hypertherm plasma cutter. Now, for 120 volt tools, I just use 12 gauge.........which is a great option for the OP, unless they want to splurge for 10 gauge, which will handle more than the ends you will be using.
Also, consider how long the run is from your breaker panel to the receptacle you plug into, and consider the voltage of your supply. Around where I live, voltages are 122-124 on each phase, but in the campground I am currently staying in and remodeling, they have only 110v a short distance from the meters. This is in the remote mountains of San Diego, CA and I notice the lower voltage when running electric heat, microwave, AC, toaster oven, etc. in my trailer. The lower the voltage or longer the run, or smaller the wire to the receptacle, the more difference you will see with a cord on a high amp tool.......not all receptacles will give you the same performance.
Yellow Jacket cords used to be USA made and very flexible. The new ones are made in China. A year or two ago I looked for a 100 foot 10 ga cord and found that the rigid brand at HD was a mix of USA and China for the same product....they were switching over, or had, so I bought the USA version.
My 6ga is Carol brand and is USA made, bought from amazon. I think it is SO cord, which is 600v, where SJ is 300v rated insulation and thinner. Both work at home, but for a saw my brother and I built and ran, we went with SO as we were running a 400v 50hz motor at 480/60 from a 20k generator.
My dewalt 15 amp 12" miter saw starts and cuts fine with a 100' 12ga cord, with utility power or the 20k generator we use and I would expect the same for your compressor, just as it works for my Porter Cable suitcase portable compressor. As others mentioned, 16 ga is hardly worth while. 14ga is a light duty cord for me and 12ga is standard for bigger power tools. 10ga or 6 ga for welding or big motors.