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

Unified Diff: mojo/dart/packages/_mojo_for_test_only/lib/imported/sample_import2.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/imported/sample_import2.mojom.dart
diff --git a/mojo/dart/packages/_mojo_for_test_only/lib/imported/sample_import2.mojom.dart b/mojo/dart/packages/_mojo_for_test_only/lib/imported/sample_import2.mojom.dart
index 0c8a602680250b8bf9d9b33c4f2858d2d78fc51c..bcec0e42e593133fa1e58597e0ae4a582702bc76 100644
--- a/mojo/dart/packages/_mojo_for_test_only/lib/imported/sample_import2.mojom.dart
+++ b/mojo/dart/packages/_mojo_for_test_only/lib/imported/sample_import2.mojom.dart
@@ -4,6 +4,8 @@
library sample_import2_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;
@@ -285,15 +287,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,136,0,0,0,0,0,0,0,32,0,0,0,3,0,0,0,24,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,72,0,0,0,0,0,0,0,30,0,0,0,22,0,0,0,84,89,80,69,95,75,69,89,58,105,109,112,111,114,116,101,100,46,83,105,122,101,0,0,31,0,0,0,23,0,0,0,84,89,80,69,95,75,69,89,58,105,109,112,111,114,116,101,100,46,84,104,105,110,103,0,31,0,0,0,23,0,0,0,84,89,80,69,95,75,69,89,58,105,109,112,111,114,116,101,100,46,67,111,108,111,114,0,56,0,0,0,3,0,0,0,16,0,0,0,1,0,0,0,40,0,0,0,0,0,0,0,16,0,0,0,1,0,0,0,72,3,0,0,0,0,0,0,16,0,0,0,0,0,0,0,200,10,0,0,0,0,0,0,32,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,248,0,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,64,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,83,105,122,101,0,0,0,0,21,0,0,0,13,0,0,0,105,109,112,111,114,116,101,100,46,83,105,122,101,0,0,0,24,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,17,0,0,0,7,0,0,0,91,0,0,0,83,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,115,97,109,112,108,101,95,105,109,112,111,114,116,50,46,109,111,106,111,109,0,0,0,0,0,24,0,0,0,2,0,0,0,16,0,0,0,0,0,0,0,16,1,0,0,0,0,0,0,56,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,5,0,0,0,119,105,100,116,104,0,0,0,24,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,18,0,0,0,8,0,0,0,91,0,0,0,83,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,115,97,109,112,108,101,95,105,109,112,111,114,116,50,46,109,111,106,111,109,0,0,0,0,0,56,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,6,0,0,0,104,101,105,103,104,116,0,0,24,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,19,0,0,0,8,0,0,0,91,0,0,0,83,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,115,97,109,112,108,101,95,105,109,112,111,114,116,50,46,109,111,106,111,109,0,0,0,0,0,32,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,248,0,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,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,5,0,0,0,84,104,105,110,103,0,0,0,22,0,0,0,14,0,0,0,105,109,112,111,114,116,101,100,46,84,104,105,110,103,0,0,24,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,22,0,0,0,7,0,0,0,91,0,0,0,83,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,115,97,109,112,108,101,95,105,109,112,111,114,116,50,46,109,111,106,111,109,0,0,0,0,0,40,0,0,0,4,0,0,0,32,0,0,0,0,0,0,0,248,1,0,0,0,0,0,0,192,3,0,0,0,0,0,0,16,5,0,0,0,0,0,0,56,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,16,0,0,0,5,0,0,0,240,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,56,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,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,5,0,0,0,115,104,97,112,101,0,0,0,24,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,23,0,0,0,17,0,0,0,91,0,0,0,83,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,115,97,109,112,108,101,95,105,109,112,111,114,116,50,46,109,111,106,111,109,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,22,0,0,0,14,0,0,0,105,109,112,111,114,116,101,100,46,83,104,97,112,101,0,0,31,0,0,0,23,0,0,0,84,89,80,69,95,75,69,89,58,105,109,112,111,114,116,101,100,46,83,104,97,112,101,0,16,0,0,0,1,0,0,0,8,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,0,0,0,9,0,0,0,82,69,67,84,65,78,71,76,69,0,0,0,0,0,0,0,41,0,0,0,33,0,0,0,84,89,80,69,95,75,69,89,58,105,109,112,111,114,116,101,100,46,83,104,97,112,101,46,82,69,67,84,65,78,71,76,69,0,0,0,0,0,0,0,56,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,16,0,0,0,5,0,0,0,240,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,48,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,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-13,0,0,0,5,0,0,0,99,111,108,111,114,0,0,0,24,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,24,0,0,0,8,0,0,0,91,0,0,0,83,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,115,97,109,112,108,101,95,105,109,112,111,114,116,50,46,109,111,106,111,109,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,13,0,0,0,5,0,0,0,67,111,108,111,114,0,0,0,31,0,0,0,23,0,0,0,84,89,80,69,95,75,69,89,58,105,109,112,111,114,116,101,100,46,67,111,108,111,114,0,16,0,0,0,1,0,0,0,8,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0,0,0,11,0,0,0,67,111,108,111,114,46,66,76,65,67,75,0,0,0,0,0,37,0,0,0,29,0,0,0,84,89,80,69,95,75,69,89,58,105,109,112,111,114,116,101,100,46,67,111,108,111,114,46,66,76,65,67,75,0,0,0,56,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,16,0,0,0,5,0,0,0,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,40,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,108,111,99,97,116,105,111,110,24,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,25,0,0,0,8,0,0,0,91,0,0,0,83,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,115,97,109,112,108,101,95,105,109,112,111,114,116,50,46,109,111,106,111,109,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,13,0,0,0,5,0,0,0,80,111,105,110,116,0,0,0,31,0,0,0,23,0,0,0,84,89,80,69,95,75,69,89,58,105,109,112,111,114,116,101,100,46,80,111,105,110,116,0,56,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,16,0,0,0,5,0,0,0,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,40,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,115,105,122,101,0,0,0,0,24,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,26,0,0,0,7,0,0,0,91,0,0,0,83,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,115,97,109,112,108,101,95,105,109,112,111,114,116,50,46,109,111,106,111,109,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,12,0,0,0,4,0,0,0,83,105,122,101,0,0,0,0,30,0,0,0,22,0,0,0,
-84,89,80,69,95,75,69,89,58,105,109,112,111,114,116,101,100,46,83,105,122,101,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,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,5,0,0,0,67,111,108,111,114,0,0,0,22,0,0,0,14,0,0,0,105,109,112,111,114,116,101,100,46,67,111,108,111,114,0,0,24,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,12,0,0,0,5,0,0,0,91,0,0,0,83,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,115,97,109,112,108,101,95,105,109,112,111,114,116,50,46,109,111,106,111,109,0,0,0,0,0,24,0,0,0,2,0,0,0,16,0,0,0,0,0,0,0,72,1,0,0,0,0,0,0,48,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,16,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,11,0,0,0,3,0,0,0,82,69,68,0,0,0,0,0,26,0,0,0,18,0,0,0,105,109,112,111,114,116,101,100,46,67,111,108,111,114,46,82,69,68,0,0,0,0,0,0,24,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,13,0,0,0,2,0,0,0,91,0,0,0,83,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,115,97,109,112,108,101,95,105,109,112,111,114,116,50,46,109,111,106,111,109,0,0,0,0,0,31,0,0,0,23,0,0,0,84,89,80,69,95,75,69,89,58,105,109,112,111,114,116,101,100,46,67,111,108,111,114,0,48,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,16,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,13,0,0,0,5,0,0,0,66,76,65,67,75,0,0,0,28,0,0,0,20,0,0,0,105,109,112,111,114,116,101,100,46,67,111,108,111,114,46,66,76,65,67,75,0,0,0,0,24,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,14,0,0,0,2,0,0,0,91,0,0,0,83,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,115,97,109,112,108,101,95,105,109,112,111,114,116,50,46,109,111,106,111,109,0,0,0,0,0,31,0,0,0,23,0,0,0,84,89,80,69,95,75,69,89,58,105,109,112,111,114,116,101,100,46,67,111,108,111,114,0]);
+ // file. The string contains the base64 encoding of the gzip-compressed bytes.
+ var serializedRuntimeTypeInfo = "H4sIAAAJbogC/8xXzW7TQBBeNwSKoFVpoS0VP+GAFC5xxSniRAkRkVqhiuRScahSZ6kXxV7LdoXEE/A4PAKPwKNw7A3G2dnIGdvZQrCblT5N4117d75v56e7TI0NtPto6XNtV4ml676hbQBqqXn93R7ap4AdwODkuHt62D15JbxAhjEftTpyLEP2BOa2c+f74iuf9/7AFf45a+P++lzN1DktwPfa7O+fN/P9+UXOnR6/YWi/2qlniX3N8scaoA5QXiof1wHE/cw57uJ7HwF9gO1Kj9vhxUh6wueh7cnP0o5CR/0RXJyNhWMLP+bhp6HDI/tM+CPgJbJjHsWRHQ29YMxP1a4vW8lL3tT/ldS+PWtWvymPFps7/pavXsF37qCOH7pvJ7/3AJsZvlp6OsPbGvpTNm+m+3xV/qz/zJ++b2+ODjqHYB8B7mf509MZ/taXhL8GyTeXC963ovhM4uxG4uskyzD2ADkk6SfD0z3ArWuIT32P2iTP6vk6WyxO6Wga7tkXMYrdHH42sWaUzU/ZPFgGHpJ4SUqJy8W5G2d52KqIh6riReuuqm5OPcMJysN2RfHSxHjWfFyigD90/a8Xx089Vf/1udtWufETucMgL7/sYI6p6t4wsn8jpduMvn114OL8rRboPmuV8NAgvNOR+Hx7Uv87g4P37466+PwF4Fnxfi26/qr67lvl5AWtr4N9H9V3t+K8wHL2z+tPTXX5X3Xdwt6OtB/sOeBx8X7TlSY9F83zKwY9N9DnsXSGsZA+1fPhkul5LOHjc/VUK8rmtWbgVfdfEfZflNe9iuqGiVfaJ5r+X/0TAAD//wQopJxoDwAA";
// 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