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