OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef REMOTING_BASE_COMPRESSOR_ZLIB_H_ | 5 #ifndef REMOTING_BASE_COMPRESSOR_ZLIB_H_ |
6 #define REMOTING_BASE_COMPRESSOR_ZLIB_H_ | 6 #define REMOTING_BASE_COMPRESSOR_ZLIB_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "remoting/base/compressor.h" | 9 #include "remoting/base/compressor.h" |
10 | 10 |
11 typedef struct z_stream_s z_stream; | 11 typedef struct z_stream_s z_stream; |
12 | 12 |
13 namespace remoting { | 13 namespace remoting { |
14 | 14 |
15 // A lossless compressor using zlib. | 15 // A lossless compressor using zlib. |
16 class CompressorZlib : public Compressor { | 16 class CompressorZlib : public Compressor { |
17 public: | 17 public: |
18 CompressorZlib(); | 18 CompressorZlib(); |
19 virtual ~CompressorZlib(); | 19 virtual ~CompressorZlib(); |
20 | 20 |
21 // Compressor implementations. | 21 // Compressor implementations. |
22 virtual bool Process(const uint8* input_data, int input_size, | 22 virtual bool Process(const uint8* input_data, |
23 uint8* output_data, int output_size, | 23 int input_size, |
24 CompressorFlush flush, int* consumed, int* written); | 24 uint8* output_data, |
| 25 int output_size, |
| 26 CompressorFlush flush, |
| 27 int* consumed, |
| 28 int* written) OVERRIDE; |
25 | 29 |
26 virtual void Reset(); | 30 virtual void Reset() OVERRIDE; |
27 | 31 |
28 private: | 32 private: |
29 scoped_ptr<z_stream> stream_; | 33 scoped_ptr<z_stream> stream_; |
30 }; | 34 }; |
31 | 35 |
32 } // namespace remoting | 36 } // namespace remoting |
33 | 37 |
34 #endif // REMOTING_BASE_COMPRESSOR_ZLIB_H_ | 38 #endif // REMOTING_BASE_COMPRESSOR_ZLIB_H_ |
OLD | NEW |