Okay, here's the idea. There's a weapon that an nation built a hundred or so kilometers from its coast(s), installed into the seafloor, what works by absorbing dissolved gases from the water. When the command is sent to the device by its operator, all of the gases that it stowed away are released, creating a flurry of bubbles that reduces the water's density, so that boats on it lose their buoyancy and sink. I need to know if such a weapon would work in real life. To work, it will need to lower the water density for just long enough for a battleship to find itself completely submerged. We will assume that we're dealing with a battleship that can only float as long as the water's density remains above 950 kg/m^3, and if it sinks by 30 m, it will be down for good.
In an Earthlike environment, will a weapon like that work?