diff options
author | hajimehoshi <hajimehoshi@chromium.org> | 2016-01-14 11:09:00 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-14 19:10:48 +0000 |
commit | 8ce285440282702dfe4935baa2aa2f6819bed292 (patch) | |
tree | fa520200ba4f843f74896d55d6d380c415d2dc50 /google/compression_utils.h | |
parent | 97bdded9af867019a8c68701e2cd6674839aca8d (diff) | |
download | zlib-8ce285440282702dfe4935baa2aa2f6819bed292.tar.gz |
Move components/compression to third_party/zlib/google
We are now implementing CompressibleString in third_party/WebKit/Source/
wtf/text and want to use compression algorithm, but wtf/text can't
depend on components. This CL moves components/compression to
third_party and enables wtf/text to use the compression utility.
The purpose of this CL is similar to crrev.com/14021015.
BUG=574317
TEST=n/a
Review URL: https://codereview.chromium.org/1564773002
Cr-Original-Commit-Position: refs/heads/master@{#369491}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 1e1cc1a7060ab8eb95a62da608f333e31aaba475
Diffstat (limited to 'google/compression_utils.h')
-rw-r--r-- | google/compression_utils.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/google/compression_utils.h b/google/compression_utils.h new file mode 100644 index 0000000..3bd68c5 --- /dev/null +++ b/google/compression_utils.h @@ -0,0 +1,22 @@ +// Copyright 2014 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. + +#ifndef THIRD_PARTY_ZLIB_GOOGLE_COMPRESSION_UTILS_H_ +#define THIRD_PARTY_ZLIB_GOOGLE_COMPRESSION_UTILS_H_ + +#include <string> + +namespace compression { + +// Compresses the data in |input| using gzip, storing the result in |output|. +// |input| and |output| are allowed to be the same string (in-place operation). +bool GzipCompress(const std::string& input, std::string* output); + +// Uncompresses the data in |input| using gzip, storing the result in |output|. +// |input| and |output| are allowed to be the same string (in-place operation). +bool GzipUncompress(const std::string& input, std::string* output); + +} // namespace compression + +#endif // THIRD_PARTY_ZLIB_GOOGLE_COMPRESSION_UTILS_H_ |