I'm imagining a canister for storing compressed gas connected to a fully inflated balloon. This is sea-level. The valve is open so air can move freely between the bag and the tank. Some heavy objects, let's say, bags of sand, are attached to the canister to overcome the buoyancy of the balloon and the contraption is tossed overboard and is allowed to sink into the sea.
I presume as the depth increases the gas in the canister/balloon would become increasingly compressed. If the balloon was too small there would be a depth beyond which the balloon would be completely deflated.
By some mechanism, at some depth, the valve is closed and the ballast is disconnected. I would like to retrieve the canister of compressed air by allowing it to float back to the surface but I would settle for having the canister tethered by some cable.
I suspect I am violating conservation of energy somewhere, but I can't shake the intuition that such a system could convert the potential energy of the sea-level ballast rather cleanly to compressed gas.
Why is this impractical?, I guess, is what I am wondering. Too much energy to move the heavy ballast material? Compressed gas not worth having? Gas compresses to liquid and messes up all the equations? Containment cannot work for the canister at surface retrieval due to material constraints? Or maybe the volume of the gas required to make this practical can't be submerged this way.
Edit: In thinking about how to edit this question to make it a physics question instead of an engineering question I fear I would have to change so much that the exchange in the comments below would lose its context. I knew the question felt a bit border-line as I was asking it, so I tried to put in a concrete example. That contributes to the 'engineering' feel of the question but it could have turned out to have been an acceptable question if read and answered in good faith. (see my comment on the accepted answer)