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

Unified Diff: mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/test_enums.mojom.dart

Issue 1776243004: Mojom runtime type info: Use compression and base64 encoding. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebasing Created 4 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
Index: mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/test_enums.mojom.dart
diff --git a/mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/test_enums.mojom.dart b/mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/test_enums.mojom.dart
index 1f9b6436b0d3f5e024d0dd0f379fc42619c87cec..50939fde37cb221ce6729341c8d77eeb6028c7c4 100644
--- a/mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/test_enums.mojom.dart
+++ b/mojo/dart/packages/_mojo_for_test_only/lib/mojo/test/test_enums.mojom.dart
@@ -4,6 +4,8 @@
library test_enums_mojom;
import 'dart:collection';
+import 'dart:convert';
+import 'dart:io';
import 'dart:typed_data';
import 'package:mojo/bindings.dart' as bindings;
import 'package:mojo/mojo/bindings/types/mojom_types.mojom.dart' as mojom_types;
@@ -88,13 +90,14 @@ var _runtimeTypeInfo;
mojom_types.RuntimeTypeInfo _initRuntimeTypeInfo() {
// serializedRuntimeTypeInfo contains the bytes of the Mojo serialization of
// a mojom_types.RuntimeTypeInfo struct describing the Mojom types in this
- // file.
- var serializedRuntimeTypeInfo = new Uint8List.fromList(const [24,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,16,0,0,0,1,0,0,0,8,0,0,0,0,0,0,0,35,0,0,0,27,0,0,0,84,89,80,69,95,75,69,89,58,109,111,106,111,46,116,101,115,116,46,84,101,115,116,69,110,117,109,0,0,0,0,0,24,0,0,0,1,0,0,0,16,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,240,0,0,0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,48,0,0,0,0,0,0,0,56,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,8,0,0,0,84,101,115,116,69,110,117,109,26,0,0,0,18,0,0,0,109,111,106,111,46,116,101,115,116,46,84,101,115,116,69,110,117,109,0,0,0,0,0,0,24,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,3,0,0,0,5,0,0,0,87,0,0,0,79,0,0,0,47,104,111,109,101,47,114,117,100,111,109,105,110,101,114,47,109,111,106,111,47,115,114,99,47,109,111,106,111,47,112,117,98,108,105,99,47,105,110,116,101,114,102,97,99,101,115,47,98,105,110,100,105,110,103,115,47,116,101,115,116,115,47,116,101,115,116,95,101,110,117,109,115,46,109,111,106,111,109,0,40,0,0,0,4,0,0,0,32,0,0,0,0,0,0,0,104,1,0,0,0,0,0,0,176,2,0,0,0,0,0,0,248,3,0,0,0,0,0,0,48,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,8,1,0,0,0,0,0,0,16,0,0,0,0,0,0,0,32,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,48,0,0,0,0,0,0,0,56,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,4,0,0,0,84,69,83,84,0,0,0,0,31,0,0,0,23,0,0,0,109,111,106,111,46,116,101,115,116,46,84,101,115,116,69,110,117,109,46,84,69,83,84,0,24,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,4,0,0,0,2,0,0,0,87,0,0,0,79,0,0,0,47,104,111,109,101,47,114,117,100,111,109,105,110,101,114,47,109,111,106,111,47,115,114,99,47,109,111,106,111,47,112,117,98,108,105,99,47,105,110,116,101,114,102,97,99,101,115,47,98,105,110,100,105,110,103,115,47,116,101,115,116,115,47,116,101,115,116,95,101,110,117,109,115,46,109,111,106,111,109,0,35,0,0,0,27,0,0,0,84,89,80,69,95,75,69,89,58,109,111,106,111,46,116,101,115,116,46,84,101,115,116,69,110,117,109,0,0,0,0,0,16,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,8,1,0,0,0,0,0,0,16,0,0,0,0,0,0,0,32,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,48,0,0,0,0,0,0,0,56,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,1,0,0,0,86,0,0,0,0,0,0,0,28,0,0,0,20,0,0,0,109,111,106,111,46,116,101,115,116,46,84,101,115,116,69,110,117,109,46,86,0,0,0,0,24,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,4,0,0,0,12,0,0,0,87,0,0,0,79,0,0,0,
-47,104,111,109,101,47,114,117,100,111,109,105,110,101,114,47,109,111,106,111,47,115,114,99,47,109,111,106,111,47,112,117,98,108,105,99,47,105,110,116,101,114,102,97,99,101,115,47,98,105,110,100,105,110,103,115,47,116,101,115,116,115,47,116,101,115,116,95,101,110,117,109,115,46,109,111,106,111,109,0,35,0,0,0,27,0,0,0,84,89,80,69,95,75,69,89,58,109,111,106,111,46,116,101,115,116,46,84,101,115,116,69,110,117,109,0,0,0,0,0,16,0,0,0,3,0,0,0,1,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,8,1,0,0,0,0,0,0,16,0,0,0,0,0,0,0,32,1,0,0,0,0,0,0,2,0,0,0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,48,0,0,0,0,0,0,0,56,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,3,0,0,0,70,79,79,0,0,0,0,0,30,0,0,0,22,0,0,0,109,111,106,111,46,116,101,115,116,46,84,101,115,116,69,110,117,109,46,70,79,79,0,0,24,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,4,0,0,0,19,0,0,0,87,0,0,0,79,0,0,0,47,104,111,109,101,47,114,117,100,111,109,105,110,101,114,47,109,111,106,111,47,115,114,99,47,109,111,106,111,47,112,117,98,108,105,99,47,105,110,116,101,114,102,97,99,101,115,47,98,105,110,100,105,110,103,115,47,116,101,115,116,115,47,116,101,115,116,95,101,110,117,109,115,46,109,111,106,111,109,0,35,0,0,0,27,0,0,0,84,89,80,69,95,75,69,89,58,109,111,106,111,46,116,101,115,116,46,84,101,115,116,69,110,117,109,0,0,0,0,0,16,0,0,0,3,0,0,0,2,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,8,1,0,0,0,0,0,0,16,0,0,0,0,0,0,0,32,1,0,0,0,0,0,0,3,0,0,0,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,48,0,0,0,0,0,0,0,56,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,3,0,0,0,66,65,82,0,0,0,0,0,30,0,0,0,22,0,0,0,109,111,106,111,46,116,101,115,116,46,84,101,115,116,69,110,117,109,46,66,65,82,0,0,24,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,4,0,0,0,28,0,0,0,87,0,0,0,79,0,0,0,47,104,111,109,101,47,114,117,100,111,109,105,110,101,114,47,109,111,106,111,47,115,114,99,47,109,111,106,111,47,112,117,98,108,105,99,47,105,110,116,101,114,102,97,99,101,115,47,98,105,110,100,105,110,103,115,47,116,101,115,116,115,47,116,101,115,116,95,101,110,117,109,115,46,109,111,106,111,109,0,35,0,0,0,27,0,0,0,84,89,80,69,95,75,69,89,58,109,111,106,111,46,116,101,115,116,46,84,101,115,116,69,110,117,109,0,0,0,0,0,16,0,0,0,3,0,0,0,3,0,0,0,0,0,0,0]);
+ // file. The string contains the base64 encoding of the gzip-compressed bytes.
+ var serializedRuntimeTypeInfo = "H4sIAAAJbogC/5JggAABKG0ApdHFYTQHGo2uzgGJz4ikThmIpYE4JDLANd7bNdIqNz8rX68ktbhELwRIuOaV5sLNY8RiH7o9H6C0BwMm+A8EMH9YIInhUg8zF2QXzDFSQLYQEONwJoZ7mIGYFYjDgdgfiPUz8nNT9YtKU/JzM/NSi/RB5ugXFyVDGAWlSTmZyfqZeSWpRWmJyanF+kmZeSmZeenF+iC7IGR8KtC2Yj2QhlwGDaCZLECsALUvgxFCb2CC0D+YUeNPAxZ+jKjuVGBE9Te1wo8H6r4Q1+AQEF8eiMWxhp8eWAl6+IH0MtEw/IhNfwLQuGRgIC08GakcnpxQM8OgfBkgFsEenmHY0iMLNE4GS3gykhieTFQOT26oO9z8/cF8OSAWwx6eYCXYwlN4EIUnE4nhyUyj8HRyDCIUnmAl2MJTZhCFJyx8AAEAAP//NXnBphAHAAA=";
// Deserialize RuntimeTypeInfo
- var bdata = new ByteData.view(serializedRuntimeTypeInfo.buffer);
- var message = new bindings.Message(bdata, null, serializedRuntimeTypeInfo.length, 0);
+ var bytes = BASE64.decode(serializedRuntimeTypeInfo);
+ var unzippedBytes = new ZLibDecoder().convert(bytes);
+ var bdata = new ByteData.view(unzippedBytes.buffer);
+ var message = new bindings.Message(bdata, null, unzippedBytes.length, 0);
_runtimeTypeInfo = mojom_types.RuntimeTypeInfo.deserialize(message);
return _runtimeTypeInfo;
}

Powered by Google App Engine
This is Rietveld 408576698