Oil prices eased slightly on Wednesday in choppy trade as record high U.S. crude and gasoline inventories fed concerns about a global glut.

The bearish U.S. inventory data was largely offset by evidence earlier this week that the Organization of the Petroleum Exporting Countries and other producers were complying with agreed-upon supply cuts. A weaker dollar also helped to support greenback-denominated oil.

"There's a certain resilience in price - forward expectations that we are going to reduce supplies globally is holding the market," said Gene McGillian, manager of market research at Tradition Energy in Stamford, Connecticut.

U.S. crude stocks soared 9.5 million barrels last week, nearly three times forecasts, to reach a peak at 518.12 million barrels, U.S. Energy Information Administration (EIA) data showed.

U.S. gasoline stocks also hit a record, rising 2.8 million barrels to 259.1 million barrels.

Prices had whipsawed after the EIA data, but at settlement, Brent futures ended down 22 cents, or 0.4 per cent, at US$55.75 a barrel and U.S. crude fell 9 cents, or 0.2 per cent, to US$53.11 a barrel.

U.S. crude has been supported in a US$50 to US$55 a barrel range since late last year by the expectation of output cuts, but more evidence of market rebalancing is needed to maintain prices in this range, Tradition's McGillian said.

"We saw (U.S. refining) utilization rates drop but didn't see a corresponding drop in gasoline inventories which indicates that demand may not be as steady as people have expected, and still the market holds," he said.

Gasoline inventories have surged 10 per cent since the end of 2016, and demand for motor fuel in the last four weeks was down 5.3 per cent year-on-year, the EIA said.

Despite the bearish data, U.S. gasoline futures ended slightly higher at US$1.5479 a gallon.

"The U.S. witnessed yet another week of higher-than-expected stock builds; nonetheless, the (crude) build was less than last week's, which helped prices recoup some of the earlier losses," said Abhishek Kumar, senior energy analyst at Interfax Energy's Global Gas Analytics in London.

"A build in gasoline stock is in tandem with seasonal norms and further builds are expected in the coming weeks as demand for the fuel remains low."

OPEC and other producers, including Russia, are cutting output by almost 1.8 million barrels per day in the first half of 2017.

OPEC in January delivered record compliance of over 90 per cent with its output curbs, according to estimates from the International Energy Agency and figures collected by OPEC's headquarters.

Still, a report by BMI Research said a compliance rate of just 40 per cent by Iraq, OPEC's second-biggest producer, "could prove problematic to group cohesion."

Also, Russia and the other non-OPEC producers have delivered smaller cutbacks. The oil minister of Oman, one of the participating non-OPEC countries, said he expected compliance to improve.