diff -rupN org/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.C mod/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.C
--- org/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.C	2013-05-07 20:23:34.365402010 +0300
+++ mod/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.C	2013-05-07 21:18:26.838240437 +0300
@@ -36,6 +36,7 @@ License
 namespace Foam
 {
     makeSurfaceWriterType(rawSurfaceWriter);
+    addToRunTimeSelectionTable(surfaceWriter, rawSurfaceWriter, wordDict);
 }
 
 
@@ -226,7 +227,13 @@ void Foam::rawSurfaceWriter::writeTempla
         mkDir(outputDir);
     }
 
-    OFstream os(outputDir/fieldName + '_' + surfaceName + ".raw");
+    OFstream os
+    (
+        outputDir/fieldName + '_' + surfaceName + ".raw",
+        IOstream::ASCII,
+        IOstream::currentVersion,
+        writeCompression_
+    );
 
     if (verbose)
     {
@@ -272,10 +279,25 @@ void Foam::rawSurfaceWriter::writeTempla
 
 Foam::rawSurfaceWriter::rawSurfaceWriter()
 :
-    surfaceWriter()
+    surfaceWriter(),
+    writeCompression_(IOstream::UNCOMPRESSED)
 {}
 
 
+Foam::rawSurfaceWriter::rawSurfaceWriter(const dictionary& options)
+:
+    surfaceWriter(),
+    writeCompression_(IOstream::UNCOMPRESSED)
+{
+    // choose uncompressed or compressed output
+    if (options.found("compression"))
+    {
+        writeCompression_ =
+            IOstream::compressionEnum(options.lookup("compression"));
+    }
+}
+
+
 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
 
 Foam::rawSurfaceWriter::~rawSurfaceWriter()
@@ -298,7 +320,13 @@ void Foam::rawSurfaceWriter::write
         mkDir(outputDir);
     }
 
-    OFstream os(outputDir/surfaceName + ".raw");
+    OFstream os
+    (
+        outputDir/surfaceName + ".raw",
+        IOstream::ASCII,
+        IOstream::currentVersion,
+        writeCompression_
+    );
 
     if (verbose)
     {
diff -rupN org/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.H mod/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.H
--- org/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.H	2013-05-07 20:23:34.365402010 +0300
+++ mod/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.H	2013-05-07 21:21:51.800678054 +0300
@@ -51,6 +51,12 @@ class rawSurfaceWriter
 :
     public surfaceWriter
 {
+    // Private data
+
+        //- Output compression (default is IOstream::UNCOMPRESSED)
+        IOstream::compressionType writeCompression_;
+
+
     // Private Member Functions
 
         static inline void writeLocation
@@ -106,6 +112,9 @@ public:
         //- Construct null
         rawSurfaceWriter();
 
+        //- Construct with some output options
+        rawSurfaceWriter(const dictionary& options);
+
 
     //- Destructor
     virtual ~rawSurfaceWriter();
