Roughly a third of food produced — 1.3 billion tons of the stuff — never makes it from farm to fork, according to the U.N’s Food and Agriculture Organization. In the poor world, much of this waste occurs before consumers even set eyes on items.

Pests feast on badly stored produce; potholed roads mean victuals rot on slow journeys to market. In the rich world, waste takes different forms: items that never get picked off supermarket shelves; food that is bought but then goes out of date.

Such prodigious waste exacts multiple costs, from hunger to misspent cash. Few producers and processors record accurately what they throw away, and supermarkets resist sharing such information. But some estimates exist: retailers are reckoned to mark down or throw out about 2 percent to 4 percent of meat, for example. Even a tiny reduction in that amount can mean millions of dollars in savings for large chains.

Waste also damages the environment. The amounts of water, fertilizer, fuel and other resources used to produce never-consumed food are vast. The emissions generated during the process of making wasted food exceeds those of Brazil in total.

Squandering meat is particularly damaging: livestock account for more emissions than the world’s vehicle fleet. Consumption is also set to increase by three-quarters by the middle of the century as newly rich diners in China, India and elsewhere develop a taste for it. The U.N. wants to halve food waste per person in shops and in households by 2030 under its Sustainable Development Goals.

Help is at hand in the sometimes squishy, see-through shape of packaging. Far from being the blight that green critics claim it is, food wrappings can in fact be an environmental boon. By more than doubling the time that some meat items can stay on shelves, for example, better packaging ensures that precious resources are used more efficiently. Planet and profits both benefit.

Vacuum packaging helps enormously here (even though shoppers tend to prefer their cuts draped behind glass counters, or nestled on slabs of black polystyrene). The plastic packs, which prevent oxidation, mean meat can stay on shelves for between five and eight days, rather than two to four. It also makes it more tender.

The equipment to vacuum-pack meat costs a few hundred thousand dollars, and its flimsier nature requires different methods of stacking. British retailers are pioneers when it comes to reducing waste through clever wrappings, said Ron Cotterman of Sealed Air, a U.S. packaging giant that works in more than 160 countries and whose clients include huge chains such as Wal-Mart and Kroger.

J. Sainsbury, a British grocer which also works with Sealed Air, is already benefiting from a new approach. Jane Skelton, its head of packaging, said that in the past financial year the store reduced waste by more than half after moving more beefsteak lines into vacuum packing. Kroger now ensures that cheeses arrive at its deli counters in vacuum-packaged bags ready for slicing; Wal-Mart is searching for better ways to wrap meats.

Packaging works wonders for customers, too. The resealable kind keeps certain dairy products fresher for far longer in customers’ fridges. The practice of packaging a lump of produce in portions allows the growing number of singletons to prepare exactly what they need and freeze the rest.

Tesco, a British grocer, now offers chicken in pre-portioned packaging, for example. In 2016 the chain said it aimed to reach a point where no edible food would be binned from its stores by the end of 2017 — down from 59,400 tons a year now — with a little help from apps that allow charities to collect unwanted items.

Longer-lasting products ought to mean fewer trips to the shops. But according to Liz Goodwin, a food-waste expert at the World Resources Institute, a think tank, half of the money shoppers save through better-lasting products winds up in retailers’ tills anyway. Aspiring cooks are more likely to buy premium items if they know they will use them before they spoil.

Vacuum packs and other kinds of wrapping do themselves consume energy and resources in their manufacture. But they make more sense than letting food go to waste. Mark Little, who is in charge of reducing food waste at Tesco, points out that every ton of waste means the equivalent of 3.5 tons of carbon dioxide are released without purpose. In contrast, a ton of packaging causes emissions of 1 to 2 tons.

This fact is insufficiently recognized by many rich-world retailers. Some supermarkets are trying to cut down on packaging because the common perception is that it is wasteful. But cutting the amount of plastic covering food makes no sense if products then spoil faster, said Simon Oxley of Marks and Spencer (another British retailer, which was among the first to start adopting vacuum-packaging a decade ago). The next frontier for the world of packaging, he said, is ensuring that as much of it can be reused as possible. That will be a challenge, however, given the hard-to-recycle layers of plastics that go into most vacuum packs.

The hope is that rich-world adoption of more efficient packaging could encourage supermarkets in places such as China and Brazil, where retail chains are growing apace, to follow suit (even if issues of hygiene and refrigeration are more pressing concerns at the moment).

By the middle of the century, when the U.N. projects the world’s population to be almost 9.7 billion people, nutrition needs mean that farms, food processors, shops and homes will need to use resources far more efficiently. Unpack the numbers, and it is clear that wrapping up well will help.