Index: src/uk/me/parabola/splitter/Utils.java
===================================================================
--- src/uk/me/parabola/splitter/Utils.java	(revision 33)
+++ src/uk/me/parabola/splitter/Utils.java	(working copy)
@@ -15,6 +15,8 @@
  */
 package uk.me.parabola.splitter;
 
+import java.util.Locale;
+
 /**
  * Some miscellaneous functions that are used within the .img code.
  *
@@ -22,6 +24,9 @@
  */
 public class Utils {
 
+	/* Create an empty locale, because it is not available prior version 1.6 of Java */
+	public static Locale rootlocale = new Locale("", "", "");
+
 	public static double toDegrees(int val) {
 		return (double) val / ((1 << 24) / 360.0);
 	}
Index: src/uk/me/parabola/splitter/AreaList.java
===================================================================
--- src/uk/me/parabola/splitter/AreaList.java	(revision 33)
+++ src/uk/me/parabola/splitter/AreaList.java	(working copy)
@@ -70,11 +70,11 @@
 
 			for (SubArea a : areas) {
 				Area b = a.getBounds();
-				pw.format(Locale.ROOT, "%d: %d,%d to %d,%d\n",
+				pw.format(Utils.rootlocale, "%d: %d,%d to %d,%d\n",
 						a.getMapid(),
 						b.getMinLat(), b.getMinLong(),
 						b.getMaxLat(), b.getMaxLong());
-				pw.format(Locale.ROOT, "#       : %f,%f to %f,%f\n",
+				pw.format(Utils.rootlocale, "#       : %f,%f to %f,%f\n",
 						Utils.toDegrees(b.getMinLat()), Utils.toDegrees(b.getMinLong()),
 						Utils.toDegrees(b.getMaxLat()), Utils.toDegrees(b.getMaxLong()));
 				pw.println();
@@ -107,7 +107,7 @@
 			String line;
 			while ((line = br.readLine()) != null) {
 				line = line.trim();
-				if (line.isEmpty() || line.charAt(0) == '#')
+				if (line.length() == 0 || line.charAt(0) == '#')
 					continue;
 
 				Matcher matcher = pattern.matcher(line);
Index: src/uk/me/parabola/splitter/SubArea.java
===================================================================
--- src/uk/me/parabola/splitter/SubArea.java	(revision 33)
+++ src/uk/me/parabola/splitter/SubArea.java	(working copy)
@@ -84,16 +84,29 @@
 			return size;
 	}
 
-	public void initForWrite(int extra) {
+	public void initForWrite(int extra, boolean compressed) {
 		extendedBounds = new Area(bounds.getMinLat() - extra,
 				bounds.getMinLong() - extra,
 				bounds.getMaxLat() + extra,
 				bounds.getMaxLong() + extra);
 
-		String filename = new Formatter().format(Locale.ROOT, "%08d.osm.gz", mapid).toString();
+		String filename;
+		String extension;
+		if (compressed) {
+			extension = ".osm.gz";
+		} else {
+			extension = ".osm";
+		}
+		filename = new Formatter().format(Utils.rootlocale, "%08d%s", mapid, extension).toString();
+
 		try {
 			FileOutputStream fos = new FileOutputStream(filename);
-			OutputStream zos = new GZIPOutputStream(fos);
+			OutputStream zos;
+			if (compressed) {
+				zos = new GZIPOutputStream(fos);
+			} else {
+				zos = fos;
+			}
 			Writer w = new OutputStreamWriter(zos, "utf-8");
 			writer = new BufferedWriter(w);
 			writeHeader();
Index: src/uk/me/parabola/splitter/Main.java
===================================================================
--- src/uk/me/parabola/splitter/Main.java	(revision 33)
+++ src/uk/me/parabola/splitter/Main.java	(working copy)
@@ -62,6 +62,9 @@
 	private AreaList areaList;
 	private boolean mixed;
 
+	// The option "-compressed=false" will turn off compression of the output data.
+	private boolean compressed;
+
 	public static void main(String[] args) {
 		Main m = new Main();
 
@@ -118,6 +121,7 @@
 		overlapAmount = config.getProperty("overlap", overlapAmount);
 		maxNodes = config.getProperty("max-nodes", maxNodes);
 		mixed = config.getProperty("mixed", false);
+		compressed = config.getProperty("compressed", true);
 
 		if (config.containsKey("split-file")) {
 			String splitFile = config.getProperty("split-file");
@@ -194,7 +198,7 @@
 		System.out.println("starting write out  " + new Date());
 		
 		for (SubArea a : areaList)
-			a.initForWrite(overlapAmount);
+			a.initForWrite(overlapAmount, compressed);
 
 		try {
 			SAXParserFactory parserFactory = SAXParserFactory.newInstance();
@@ -245,7 +249,11 @@
 			w.println();
 			w.format("mapname: %d\n", a.getMapid());
 			w.println("description: OSM Map");
-			w.format("input-file: %d.osm.gz\n", a.getMapid());
+			if (compressed) {
+				w.format("input-file: %d.osm.gz\n", a.getMapid());
+			} else {
+				w.format("input-file: %d.osm\n", a.getMapid());
+			}
 		}
 
 		w.println();
