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 <string> | |
6 #include <vector> | |
7 | |
8 namespace chromeos_update_engine { | |
9 | |
10 // BzipData compresses or decompresses the input to the output. | |
11 // Returns true on success. | |
12 // Use one of BzipBuffToBuff*ompress as the template parameter to BzipData(). | |
13 int BzipBuffToBuffDecompress(char* out, | |
Daniel Erat
2010/03/11 23:25:04
Are these supposed to be outside-facing? If not,
| |
14 size_t* out_length, | |
15 const char* in, | |
16 size_t in_length); | |
17 int BzipBuffToBuffCompress(char* out, | |
18 size_t* out_length, | |
19 const char* in, | |
20 size_t in_length); | |
21 template<int F(char* out, | |
22 size_t* out_length, | |
23 const char* in, | |
24 size_t in_length)> | |
25 bool BzipData(const char* const in, | |
26 const size_t in_size, | |
27 std::vector<char>* const out); | |
28 | |
29 // Helper functions: | |
30 bool BzipDecompress(const std::vector<char>& in, std::vector<char>* out); | |
31 bool BzipCompress(const std::vector<char>& in, std::vector<char>* out); | |
32 bool BzipCompressString(const std::string& str, std::vector<char>* out); | |
33 bool BzipDecompressString(const std::string& str, std::vector<char>* out); | |
34 | |
35 } // namespace chromeos_update_engine | |
OLD | NEW |