Diffeomorphism of an open set and almost all of $\mathbb{R}^n$ (Question reposted from Math Stackexchange)
I am aware of the statement that a open set in $\mathbb{R}^n$, if it is star-like, is diffeomorphic to $\mathbb{R}^n$, although this is apparently not so easy to prove. I am wondering if a weaker statement exists. Namely, if $U$ is an open set of $\mathbb{R}^n$, does there always exist a diffeomorphism $\phi : U\to\mathbb{R}^n\setminus N$ where $N$ is a Lebesgue-negligible set?
Edit: Here is a reference the claim that star-shaped open sets are diffeomorphic to $\mathbb{R}^n$.
 A: Yes, there always exists such a diffeomorphism (provided $U$ is nonempty). It can be constructed using the following lemma.

Lemma.
Let $K\subset V\subset(0,1)^n$ be a pair of sets, with $K$ compact and $V$ nonempty open. Then there exists a diffeomorphism $\psi$ of $(0,1)^n$ such that $\psi$ is the identity over $K$ and the measure of $\psi((0,1)^n\setminus V)$ is at most half of that of $(0,1)^n\setminus V$.

Using the lemma, we can construct your diffeomorphism using a compact exhaustion of $U$. For instance, up to a diffeomorphism $\mathbb R^n\to(0,1)^n$, we can assume that $U$ is an open subset of $(0,1)^n$, and we want a diffeomorphism $\phi:U\to\phi(U)\subset(0,1)^n$ such that $(0,1)^n\setminus\phi(U)$ has zero measure. Write $U=\bigcup_{i\geq0}K_i$ with $K_i$ compact and $K_i\subset\operatorname{int}K_{i+1}$ for all $i\geq0$.¹ Then, using the lemma, we can define $\psi_0$ that fixes $K_0$ and such that the measure of $(0,1)^n\setminus\operatorname{int}K_1$ is halved under the action of $\psi_0$. In the next step, we define $\psi_1$ that fixes $\psi_0(K_1)$ and such that the measure of $(0,1)^n\setminus\psi_0(\operatorname{int}K_2)$ is halved. Iteratively, we define a sequence of diffeomorphisms of $(0,1)^n$, with the property that $\psi_k\circ\cdots\circ\psi_0$ stabilises over each fixed $K_i$. The limit diffeomorphism is well-defined over $U$, and sends it to a set of full measure.
It remains to prove the lemma. Let $K\subset V\subset(0,1)^n$ be as described. Set $m:=|(0,1)^n\setminus V|$ the Lebesgue measure of the complement of $V$. We want to get it down to at most $m/2$. If $m=0$, then we can just choose the identity; assume then that $m>0$.
Step 0: cubes and blow-ups. One can cover $(0,1)^n\setminus V$ by a finite number of open cubes $C_1,\ldots,C_L\subset(0,1)^n$ that do not intersect $K$.² Cubes that intersect are called neighbours.
The diffeomorphism $\psi$ will be constructed by (finitely many) successive blow-ups: if $V$ intersects $C_\ell$ and $C\subset C_\ell$ is a closed cube (in the sequel, $C$ will fill $C_\ell$ almost entirely), there is a diffeomorphism $\theta:(0,1)^n\to(0,1)^n$ (that I will call a blow-up) whose support (the closure of the set of $x$ with $\theta(x)\neq x$) is compact in $C_\ell$, and such that $\theta(V)$ contains $C$. The existence of such a $\theta$ is clear on a picture, and to construct it explicitly is not too difficult. I will write $V$ instead of $V_t=\theta_{t-1}(V_{t-1})$ for the successive blow-ups of $V$ for notational clarity; however, $m$ is fixed and is the volume of the complement of the initial $V_0=V$.
Step 1: connectedness. To be free, in the next step, to blow up any cube, we want $V$ to intersect every cube $C_\ell$. We work by induction, proving that for all $k$, up to a finite number of blow ups, there exists at least $k$ cubes $C_\ell$ such that $V$ intersects $C_\ell$ together with all its neighbours.
The base case $k=0$ is clear. Suppose the result is true for some $k<L$, and without loss of generality assume that $C_1,\ldots,C_k$ satisfy the above conditions (potentially after a few blow-ups). Then
$$\begin{align*} V\cup\bigcup_{\ell\leq k}C_\ell && \text{and} && \bigcup_{\ell>k}C_\ell \end{align*} $$
are two open sets that cover the connected set $(0,1)^n$. Since none of them are empty, they must intersect, so one of the $C_\ell$ with $\ell>k$ must intersect $V$ (since intersecting a good cube means also intersecting $V$). Let $C\subset C_\ell$ be a closed cube large enough that $C$ intersects all neighbours of $C_\ell$. Blowing up the inside of $C_\ell$ so that $V$ fills $C$, we get another good cube and conclude the induction. In particular, at this point every cube $C_\ell$ intersects $V$ and we can blow up cubes as we wish. A caveat: we must always blow up cubes with enough power that the new $V$ continues to intersect all their neighbours; we do so in step two.
Step 2: volume expansion. The point, in this section, is that there exists a constant $\delta>0$ such that if the volume of the complement of $V$, after the few blow-ups, is still at least $m/2$, then there exists a blow-up that decreases the volume further by $\delta$. Then it is clear that, choosing a good blow-up at each step, we will reach a volume at most $m/2$ after a finite number of steps.
If the volume of the complement of $V$ is at least $m/2$, then by the pigeonhole principle there must be a cube $C_\ell$ such that the complement of $V$ in $C_\ell$ has measure at least
$$ \frac m2\cdot\frac{|C_\ell|}{\sum_{\ell'}|C_{\ell'}|} =: \mu\cdot|C_\ell|. $$
This $\mu$ is fixed (independently of the blow-ups) and positive. Choose $0<\lambda<\mu\leq1$. For a closed cube $C\subset C_\ell$ of volume at least $(1-\lambda)\cdot|C_\ell|$ and intersecting all neighbours of $C_\ell$, a corresponding blow up will decrease the volume of the complement of $V$ in $C_\ell$ by at least $(\mu-\lambda)\cdot|C_\ell|$. Since we can choose $\lambda$independently of the blow-ups, this concludes the argument, showing the existence of $\delta$ for
$$ \delta := (\mu-\lambda)\cdot\min_\ell|C_\ell|>0. $$

¹ Choose a proper function $f:U\to\mathbb R$ and set $K_i=f^{-1}[-i,i]$.
² For $\varepsilon>0$ with $K\subset (\varepsilon,1-\varepsilon)^n$, such cubes cover the compact set $[\varepsilon,1-\varepsilon]^n\setminus V$. Choose a finite subcover, and add a few cubes of side $\varepsilon$ tangent to the boundary of the cube to cover $(0,1)^n\setminus[\varepsilon,1-\varepsilon]^n$.
