Index: trunk/src/org/openstreetmap/josm/io/Compression.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/Compression.java	(revision 12770)
+++ trunk/src/org/openstreetmap/josm/io/Compression.java	(revision 12772)
@@ -9,8 +9,13 @@
 import java.io.OutputStream;
 import java.nio.charset.StandardCharsets;
+import java.util.zip.GZIPInputStream;
 import java.util.zip.GZIPOutputStream;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
 import java.util.zip.ZipOutputStream;
 
+import org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream;
 import org.apache.commons.compress.compressors.bzip2.BZip2CompressorOutputStream;
+import org.openstreetmap.josm.tools.Logging;
 import org.openstreetmap.josm.tools.Utils;
 
@@ -79,13 +84,61 @@
         switch (this) {
             case BZIP2:
-                return Utils.getBZip2InputStream(in);
+                return getBZip2InputStream(in);
             case GZIP:
-                return Utils.getGZipInputStream(in);
+                return getGZipInputStream(in);
             case ZIP:
-                return Utils.getZipInputStream(in);
+                return getZipInputStream(in);
             case NONE:
             default:
                 return in;
         }
+    }
+
+    /**
+     * Returns a Bzip2 input stream wrapping given input stream.
+     * @param in The raw input stream
+     * @return a Bzip2 input stream wrapping given input stream, or {@code null} if {@code in} is {@code null}
+     * @throws IOException if the given input stream does not contain valid BZ2 header
+     * @since 12772 (moved from {@link Utils}, there since 7867)
+     */
+    public static BZip2CompressorInputStream getBZip2InputStream(InputStream in) throws IOException {
+        if (in == null) {
+            return null;
+        }
+        return new BZip2CompressorInputStream(in, /* see #9537 */ true);
+    }
+
+    /**
+     * Returns a Gzip input stream wrapping given input stream.
+     * @param in The raw input stream
+     * @return a Gzip input stream wrapping given input stream, or {@code null} if {@code in} is {@code null}
+     * @throws IOException if an I/O error has occurred
+     * @since 12772 (moved from {@link Utils}, there since 7119)
+     */
+    public static GZIPInputStream getGZipInputStream(InputStream in) throws IOException {
+        if (in == null) {
+            return null;
+        }
+        return new GZIPInputStream(in);
+    }
+
+    /**
+     * Returns a Zip input stream wrapping given input stream.
+     * @param in The raw input stream
+     * @return a Zip input stream wrapping given input stream, or {@code null} if {@code in} is {@code null}
+     * @throws IOException if an I/O error has occurred
+     * @since 12772 (moved from {@link Utils}, there since 7119)
+     */
+    public static ZipInputStream getZipInputStream(InputStream in) throws IOException {
+        if (in == null) {
+            return null;
+        }
+        ZipInputStream zis = new ZipInputStream(in, StandardCharsets.UTF_8);
+        // Positions the stream at the beginning of first entry
+        ZipEntry ze = zis.getNextEntry();
+        if (ze != null && Logging.isDebugEnabled()) {
+            Logging.debug("Zip entry: {0}", ze.getName());
+        }
+        return zis;
     }
 
Index: trunk/src/org/openstreetmap/josm/tools/Utils.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 12770)
+++ trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 12772)
@@ -58,5 +58,4 @@
 import java.util.stream.Stream;
 import java.util.zip.GZIPInputStream;
-import java.util.zip.ZipEntry;
 import java.util.zip.ZipFile;
 import java.util.zip.ZipInputStream;
@@ -71,4 +70,5 @@
 import org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream;
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.io.Compression;
 import org.w3c.dom.Document;
 import org.xml.sax.InputSource;
@@ -727,10 +727,9 @@
      * @throws IOException if the given input stream does not contain valid BZ2 header
      * @since 7867
-     */
+     * @deprecated use {@link Compression#getBZip2InputStream(java.io.InputStream)}
+     */
+    @Deprecated
     public static BZip2CompressorInputStream getBZip2InputStream(InputStream in) throws IOException {
-        if (in == null) {
-            return null;
-        }
-        return new BZip2CompressorInputStream(in, /* see #9537 */ true);
+        return Compression.getBZip2InputStream(in);
     }
 
@@ -741,10 +740,9 @@
      * @throws IOException if an I/O error has occurred
      * @since 7119
-     */
+     * @deprecated use {@link Compression#getGZipInputStream(java.io.InputStream)}
+     */
+    @Deprecated
     public static GZIPInputStream getGZipInputStream(InputStream in) throws IOException {
-        if (in == null) {
-            return null;
-        }
-        return new GZIPInputStream(in);
+        return Compression.getGZipInputStream(in);
     }
 
@@ -755,16 +753,9 @@
      * @throws IOException if an I/O error has occurred
      * @since 7119
-     */
+     * @deprecated use {@link Compression#getZipInputStream(java.io.InputStream)}
+     */
+    @Deprecated
     public static ZipInputStream getZipInputStream(InputStream in) throws IOException {
-        if (in == null) {
-            return null;
-        }
-        ZipInputStream zis = new ZipInputStream(in, StandardCharsets.UTF_8);
-        // Positions the stream at the beginning of first entry
-        ZipEntry ze = zis.getNextEntry();
-        if (ze != null && Logging.isDebugEnabled()) {
-            Logging.debug("Zip entry: {0}", ze.getName());
-        }
-        return zis;
+        return Compression.getZipInputStream(in);
     }
 
