Index: xml/src/org/openstreetmap/osmosis/xml/common/XmlTaskManagerFactory.java
===================================================================
--- xml/src/org/openstreetmap/osmosis/xml/common/XmlTaskManagerFactory.java	(Revision 25225)
+++ xml/src/org/openstreetmap/osmosis/xml/common/XmlTaskManagerFactory.java	(Arbeitskopie)
@@ -33,27 +33,21 @@
 			TaskConfiguration taskConfig, String fileName) {
 		CompressionMethod result;
 		
-		if (doesArgumentExist(taskConfig, ARG_COMPRESSION_METHOD)) {
-			String rawValue;
+		String rawValue = getStringArgument(taskConfig, ARG_COMPRESSION_METHOD, "auto").toLowerCase();
 			
-			rawValue = getStringArgument(taskConfig, ARG_COMPRESSION_METHOD).toLowerCase();
-			
-			if ("none".equals(rawValue)) {
-				result = CompressionMethod.None;
-			} else if ("gzip".equals(rawValue)) {
-				result = CompressionMethod.GZip;
-			} else if ("bzip2".equals(rawValue)) {
-				result = CompressionMethod.BZip2;
-			} else {
-				throw new OsmosisRuntimeException(
-					"Argument " + ARG_COMPRESSION_METHOD + " for task " + taskConfig.getId()
-					+ " must be one of none, gzip, or bzip2.");
-			}
-			
-		} else {
+		if ("none".equals(rawValue)) {
+			result = CompressionMethod.None;
+		} else if ("gzip".equals(rawValue)) {
+			result = CompressionMethod.GZip;
+		} else if ("bzip2".equals(rawValue)) {
+			result = CompressionMethod.BZip2;
+		} else if ("auto".equals(rawValue)) {
 			result = new CompressionMethodDeriver().deriveCompressionMethod(fileName);
-		}
-		
+		} else {
+			throw new OsmosisRuntimeException(
+				"Argument " + ARG_COMPRESSION_METHOD + " for task " + taskConfig.getId()
+				+ " must be one of none, gzip, bzip2 or auto.");
+		}		
 		return result;
 	}
 	
