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

Unified Diff: src/platform/update_engine/bzip.h

Issue 855002: AU: Bzip2 utility functions that mirror Gzip utility functions. (Closed)
Patch Set: revert utils.* Created 10 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/platform/update_engine/SConstruct ('k') | src/platform/update_engine/bzip.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/update_engine/bzip.h
diff --git a/src/platform/update_engine/bzip.h b/src/platform/update_engine/bzip.h
new file mode 100644
index 0000000000000000000000000000000000000000..72c9924d53ce5025ad64f298d60c7d1e81abdc07
--- /dev/null
+++ b/src/platform/update_engine/bzip.h
@@ -0,0 +1,35 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <string>
+#include <vector>
+
+namespace chromeos_update_engine {
+
+// BzipData compresses or decompresses the input to the output.
+// Returns true on success.
+// Use one of BzipBuffToBuff*ompress as the template parameter to BzipData().
+int BzipBuffToBuffDecompress(char* out,
Daniel Erat 2010/03/11 23:25:04 Are these supposed to be outside-facing? If not,
+ size_t* out_length,
+ const char* in,
+ size_t in_length);
+int BzipBuffToBuffCompress(char* out,
+ size_t* out_length,
+ const char* in,
+ size_t in_length);
+template<int F(char* out,
+ size_t* out_length,
+ const char* in,
+ size_t in_length)>
+bool BzipData(const char* const in,
+ const size_t in_size,
+ std::vector<char>* const out);
+
+// Helper functions:
+bool BzipDecompress(const std::vector<char>& in, std::vector<char>* out);
+bool BzipCompress(const std::vector<char>& in, std::vector<char>* out);
+bool BzipCompressString(const std::string& str, std::vector<char>* out);
+bool BzipDecompressString(const std::string& str, std::vector<char>* out);
+
+} // namespace chromeos_update_engine
« no previous file with comments | « src/platform/update_engine/SConstruct ('k') | src/platform/update_engine/bzip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698