--- gsf-outfile-zip.c.orig	2014-01-17 19:25:38.093738042 -0500
+++ gsf-outfile-zip.c	2014-01-17 21:38:37.574074373 -0500
@@ -310,7 +310,7 @@
 {
 	GsfZipDirent *dirent = gsf_zip_dirent_new ();
 	dirent->name = stream_name_build (zip);
-	dirent->compr_method = zip->compression_method;
+	dirent->compr_method = zip->compression_method ? Z_DEFLATED : GSF_ZIP_STORED;
 	dirent->dostime = zip_time_make (gsf_output_get_modtime (GSF_OUTPUT (zip)));
 	zip_dirent_update_flags (dirent);
 	return dirent;
@@ -367,11 +367,11 @@
 	zip->writing = TRUE;
 	zip->root->writing = TRUE;
 	dirent->crc32 = crc32 (0L, Z_NULL, 0);
-	if (zip->compression_method == GSF_ZIP_DEFLATED) {
+	if (zip->compression_method > 0) {
 		if (!zip->stream) {
 			zip->stream = g_new0 (z_stream, 1);
 		}
-		ret = deflateInit2 (zip->stream, Z_DEFAULT_COMPRESSION,
+		ret = deflateInit2 (zip->stream, zip->compression_method,
 				    Z_DEFLATED, -MAX_WBITS, MAX_MEM_LEVEL,
 				    Z_DEFAULT_STRATEGY);
 		if (ret != Z_OK)
@@ -477,7 +477,7 @@
 		if (!zip_init_write (output))
 			return FALSE;
 
-	if (zip->compression_method == GSF_ZIP_DEFLATED) {
+	if (zip->compression_method > 0) {
 		if (!zip_flush (zip))
 			return FALSE;
 
@@ -539,7 +539,7 @@
 			return FALSE;
 
 	dirent = zip->vdir->dirent;
-	if (zip->compression_method == GSF_ZIP_DEFLATED) {
+	if (zip->compression_method > 0) {
 		zip->stream->next_in  = (unsigned char *) data;
 		zip->stream->avail_in = num_bytes;
 
@@ -694,13 +694,10 @@
 		break;
 	case PROP_COMPRESSION_LEVEL: {
 		int level = g_value_get_int (value);
-		switch (level) {
-		case GSF_ZIP_STORED:
-		case GSF_ZIP_DEFLATED:
-			zip->compression_method = level;
-			break;
-		default:
+		if (level < 0 || level > 9) {
 			g_warning ("Unsupported compression level %d", level);
+		} else {	
+			zip->compression_method = level;
 		}
 		break;
 	}
