Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(672)

Unified Diff: remoting/base/compressor.h

Issue 2868062: EncoderZlib/DecoderZlib for chromoting (Closed)
Patch Set: from .cc to .c Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/base/codec_test.cc ('k') | remoting/base/compressor_zlib.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « remoting/base/codec_test.cc ('k') | remoting/base/compressor_zlib.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698