Energetics of a compact flare