| 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 #include "remoting/base/decompressor_verbatim.h" | |
| 6 | |
| 7 #include "base/logging.h" | |
| 8 | |
| 9 namespace remoting { | |
| 10 | |
| 11 DecompressorVerbatim::DecompressorVerbatim() { | |
| 12 } | |
| 13 | |
| 14 DecompressorVerbatim::~DecompressorVerbatim() { | |
| 15 } | |
| 16 | |
| 17 void DecompressorVerbatim::Reset() { | |
| 18 } | |
| 19 | |
| 20 bool DecompressorVerbatim::Process(const uint8* input_data, int input_size, | |
| 21 uint8* output_data, int output_size, | |
| 22 int* consumed, int* written) { | |
| 23 DCHECK_GT(output_size, 0); | |
| 24 int bytes_to_copy = std::min(input_size, output_size); | |
| 25 memcpy(output_data, input_data, bytes_to_copy); | |
| 26 | |
| 27 // Since we're just a memcpy, consumed and written are the same. | |
| 28 *consumed = *written = bytes_to_copy; | |
| 29 return true; | |
| 30 } | |
| 31 } // namespace remoting | |
| OLD | NEW |