  In this paper we present the results from the analysis of a sample of 28
gamma-ray burst (GRB) afterglow spectral energy distributions, spanning the
X-ray through to near-infrared wavelengths. This is the largest sample of GRB
afterglow spectral energy distributions thus far studied, providing a strong
handle on the optical depth distribution of soft X-ray absorption and
dust-extinction systems in GRB host galaxies. We detect an absorption system
within the GRB host galaxy in 79% of the sample, and an extinction system in
71% of the sample, and find the Small Magellanic Cloud (SMC) extinction law to
provide an acceptable fit to the host galaxy extinction profile for the
majority of cases, consistent with previous findings. The range in the soft
X-ray absorption to dust-extinction ratio, N_{H,X}/Av, in GRB host galaxies
spans almost two orders of magnitude, and the typical ratios are significantly
larger than those of the Magellanic Clouds or Milky Way. Although dust
destruction could be a cause, at least in part, for the large N_{H,X}/Av
ratios, the good fit provided by the SMC extinction law for the majority of our
sample suggests that there is an abundance of small dust grains in the GRB
environment, which we would expect to have been destroyed if dust destruction
were responsible for the large N_{H,X}/Av ratios. Instead, our analysis
suggests that the distribution of N_{H,X}/Av in GRB host galaxies may be mostly
intrinsic to these galaxies, and this is further substantiated by evidence for
a strong negative correlation between N_{H,X}/Av and metallicity for a
subsample of GRB hosts with known metallicity. Furthermore, we find the
N_{H,X}/Av ratio and metallicity for this subsample of GRBs to be comparable to
the relation found in other more metal-rich galaxies.
