Most modern clothes dryers work exactly like that.
This is still a win because it doesn't depressurize the house (any air you vent out of the house is eventually replaced by outside air, sometimes via dirty areas like crawlspaces and attics). But the heat pump ones can run off of a low-power (~1500W) circuit whereas the condensing ones typically need a higher power (~5kW) circuit.