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

Side by Side Diff: remoting/base/decompressor.h

Issue 2815043: zlib decompression for chromoting (Closed)
Patch Set: git try 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 unified diff | Download patch
« no previous file with comments | « remoting/base/compressor_zlib_unittest.cc ('k') | remoting/base/decompressor_zlib.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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_DECOMPRESSOR_H_
6 #define REMOTING_BASE_DECOMPRESSOR_H_
7
8 #include "base/basictypes.h"
9
10 namespace remoting {
11
12 // An object to decompress data losslessly. This is used in pair with
13 // a compressor.
14 //
15 // Note that a decompressor can only be used on one stream during its
16 // lifetime. This object should be destroyed after use.
17 class Decompressor {
18 public:
19 virtual ~Decompressor() {}
20
21 // Decompress |input_data| with |input_size| bytes.
22 //
23 // |output_data| is provided by the caller and |output_size| is the
24 // size of |output_data|. |output_size| must be greater than 0.
25 //
26 // Decompressed data is written to |output_data|. |consumed| will
27 // contain the number of bytes consumed from the input. |written|
28 // contains the number of bytes written to output.
29 //
30 // Returns true if this method needs to be called again because
31 // there is more bytes to be decompressed or more input data is
32 // needed.
33 virtual bool Process(const uint8* input_data, int input_size,
34 uint8* output_data, int output_size,
35 int* consumed, int* written) = 0;
36 };
37
38 } // namespace remoting
39
40 #endif // REMOTING_BASE_DECOMPRESSOR_H_
OLDNEW
« no previous file with comments | « remoting/base/compressor_zlib_unittest.cc ('k') | remoting/base/decompressor_zlib.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698