Index: remoting/base/compressor.h |
diff --git a/remoting/base/compressor.h b/remoting/base/compressor.h |
index fd4c4122d892f1e5018f2152395bced605be086e..edb64f842b95a268ba3774f8d3c4ad5e72972af5 100644 |
--- a/remoting/base/compressor.h |
+++ b/remoting/base/compressor.h |
@@ -16,6 +16,13 @@ namespace remoting { |
// lifetime. This object should be destroyed after use. |
class Compressor { |
public: |
+ |
+ // Defines the flush modes for a compressor. |
+ enum CompressorFlush { |
+ CompressorNoFlush, |
+ CompressorSyncFlush, |
+ CompressorFinish, |
+ }; |
virtual ~Compressor() {} |
// Compress |input_data| with |input_size| bytes. |
@@ -23,7 +30,14 @@ class Compressor { |
// |output_data| is provided by the caller and |output_size| is the |
// size of |output_data|. |output_size| must be greater than 0. |
// |
- // |input_size| is set to 0 to indicate the end of input stream. |
+ // |flush| is set to one of the three value: |
+ // - CompressorNoFlush |
+ // No flushing is requested |
+ // - CompressorSyncFlush |
+ // Write all pending output and write a synchronization point in the |
+ // output data stream. |
+ // - CompressorFinish |
+ // Mark the end of stream. |
// |
// Compressed data is written to |output_data|. |consumed| will |
// contain the number of bytes consumed from the input. |written| |
@@ -34,7 +48,7 @@ class Compressor { |
// useful for end of the compression stream. |
virtual bool Process(const uint8* input_data, int input_size, |
uint8* output_data, int output_size, |
- int* consumed, int* written) = 0; |
+ CompressorFlush flush, int* consumed, int* written) = 0; |
}; |
} // namespace remoting |