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

Unified Diff: runtime/bin/gzip.h

Issue 2991393002: [standalone] Automatically decompress gzip'd resources, including sources and script snapshots. (Closed)
Patch Set: . Created 3 years, 4 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
Index: runtime/bin/gzip.h
diff --git a/runtime/bin/gzip.h b/runtime/bin/gzip.h
new file mode 100644
index 0000000000000000000000000000000000000000..ed2f18dc621dbf89bac37badf31215688ed25a57
--- /dev/null
+++ b/runtime/bin/gzip.h
@@ -0,0 +1,31 @@
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#ifndef RUNTIME_BIN_GZIP_H_
+#define RUNTIME_BIN_GZIP_H_
+
+#include "platform/globals.h"
+
+namespace dart {
+namespace bin {
+
+// |input| is assumed to be a gzipped stream.
+// This function allocates the output buffer in the C heap and the caller
+// is responsible for freeing it.
+void Decompress(const uint8_t* input,
+ intptr_t input_len,
+ uint8_t** output,
+ intptr_t* output_length);
+
+// This function allocates the output buffer in the C heap and the caller
+// is responsible for freeing it.
+void Compress(const uint8_t* input,
+ intptr_t input_len,
+ uint8_t** output,
+ intptr_t* output_length);
+
+} // namespace bin
+} // namespace dart
+
+#endif // RUNTIME_BIN_GZIP_H_

Powered by Google App Engine
This is Rietveld 408576698