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

Unified Diff: third_party/zlib/google/compression_utils.h

Issue 2860903006: Handle webuis when using the network service. (Closed)
Patch Set: merge Created 3 years, 7 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 | « content/browser/webui/web_ui_url_loader_factory.cc ('k') | third_party/zlib/google/compression_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/zlib/google/compression_utils.h
diff --git a/third_party/zlib/google/compression_utils.h b/third_party/zlib/google/compression_utils.h
index 3bd68c57ec03b5723ed36612ae08ac856253be76..d496ef1af3c9959a50aa6619c99544861bf73160 100644
--- a/third_party/zlib/google/compression_utils.h
+++ b/third_party/zlib/google/compression_utils.h
@@ -7,6 +7,8 @@
#include <string>
+#include "base/strings/string_piece.h"
+
namespace compression {
// Compresses the data in |input| using gzip, storing the result in |output|.
@@ -17,6 +19,14 @@ bool GzipCompress(const std::string& input, std::string* output);
// |input| and |output| are allowed to be the same string (in-place operation).
bool GzipUncompress(const std::string& input, std::string* output);
+// Like the above method, but uses base::StringPiece to avoid allocations if
+// needed. |output|'s size must be at least as large as the return value from
+// GetUncompressedSize.
+bool GzipUncompress(base::StringPiece input, base::StringPiece output);
+
+// Returns the uncompressed size from GZIP-compressed |compressed_data|.
+uint32_t GetUncompressedSize(base::StringPiece compressed_data);
+
} // namespace compression
#endif // THIRD_PARTY_ZLIB_GOOGLE_COMPRESSION_UTILS_H_
« no previous file with comments | « content/browser/webui/web_ui_url_loader_factory.cc ('k') | third_party/zlib/google/compression_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698