  Suppose $G$ is a connected noncompact locally compact group, $A,B$ are
nonempty and compact subsets of $G$, $\mu$ is a left Haar measure on $G$.
Assuming that $G$ is unimodular, and $ \mu(A^2) < K \mu(A) $ with $K>1$ a fixed
constant, our first result shows that there is a continuous surjective group
homomorphism $\chi: G\to L$ with compact kernel, where $L$ is a Lie group with
$$\dim(L) \leq \lfloor\log K\rfloor(\lfloor\log K\rfloor+1)/2.$$ We also
demonstrate that this dimension bound is sharp, establish the relationship
between $A$ and its image under the quotient map, and obtain a more general
version of this result for the product set $AB$ without assuming unimodularity.
  Our second result classifies $G,A,B$ where $A,B$ have nearly minimal
expansions (when $G$ is unimodular, this just means $\mu(AB)$ is close to
$\mu(A)+\mu(B)$). This answers a question suggested by Griesmer and Tao, and
completes the last open case of the inverse Kemperman problem.
  The proofs of both results involve a new analysis of locally compact group
$G$ with bounded $n-h$, where $n-h$ is an invariant of $G$ appearing in the
recently developed nonabelian Brunn-Minkowski inequality. We also generalize
Ruzsa's distance and related results to possibly nonunimodular locally compact
groups.
