Implement ZLIB compressed system file reader and writer.
[pspp] / perl-module / PSPP.xs
index 0895f641a8577570fe5aff2a011d356fc1cf72f8..802aabf5c0f0216240d52d51e6ae51c81ceb8c06 100644 (file)
@@ -632,7 +632,9 @@ INIT:
     SV** version = hv_fetch(opt_h, "version", 7, 0);
 
     opts.create_writeable = readonly ? ! SvIV (*readonly) : true;
-    opts.compress = compress ? SvIV (*compress) : false;
+    opts.compression = (compress && SvIV (*compress)
+                        ? SFM_COMP_SIMPLE
+                       : SFM_COMP_NONE);
     opts.version = version ? SvIV (*version) : 3 ;
   }
 CODE: