OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Update file format: A delta update file contains all the deltas needed | 5 // Update file format: A delta update file contains all the deltas needed |
6 // to update a system from one specific version to another specific | 6 // to update a system from one specific version to another specific |
7 // version. The update format is represented by this struct pseudocode: | 7 // version. The update format is represented by this struct pseudocode: |
8 // struct delta_update_file { | 8 // struct delta_update_file { |
9 // char magic[4] = "CrAU"; | 9 // char magic[4] = "CrAU"; |
10 // uint32 file_format_version = 1; | 10 // uint64 file_format_version = 1; |
11 // uint64 manifest_size; // Size of protobuf DeltaArchiveManifest | 11 // uint64 manifest_size; // Size of protobuf DeltaArchiveManifest |
12 // // The Bzip2 compressed DeltaArchiveManifest | 12 // // The Bzip2 compressed DeltaArchiveManifest |
13 // char manifest[]; | 13 // char manifest[]; |
14 // | 14 // |
15 // // Data blobs for files, no specific format. The specific offset | 15 // // Data blobs for files, no specific format. The specific offset |
16 // // and length of each data blob is recorded in the DeltaArchiveManifest. | 16 // // and length of each data blob is recorded in the DeltaArchiveManifest. |
17 // struct { | 17 // struct { |
18 // char data[]; | 18 // char data[]; |
19 // } blobs[]; | 19 // } blobs[]; |
20 // | 20 // |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 // client. | 73 // client. |
74 | 74 |
75 message Extent { | 75 message Extent { |
76 optional uint64 start_block = 1; | 76 optional uint64 start_block = 1; |
77 optional uint64 num_blocks = 2; | 77 optional uint64 num_blocks = 2; |
78 } | 78 } |
79 | 79 |
80 message Signatures { | 80 message Signatures { |
81 message Signature { | 81 message Signature { |
82 optional uint32 version = 1; | 82 optional uint32 version = 1; |
83 optional string data = 2; | 83 optional bytes data = 2; |
84 } | 84 } |
85 repeated Signature signatures = 1; | 85 repeated Signature signatures = 1; |
86 } | 86 } |
87 | 87 |
88 message DeltaArchiveManifest { | 88 message DeltaArchiveManifest { |
89 message InstallOperation { | 89 message InstallOperation { |
90 enum Type { | 90 enum Type { |
91 REPLACE = 0; // Replace destination extents w/ attached data | 91 REPLACE = 0; // Replace destination extents w/ attached data |
92 REPLACE_BZ = 1; // Replace destination extents w/ attached bzipped data | 92 REPLACE_BZ = 1; // Replace destination extents w/ attached bzipped data |
93 MOVE = 2; // Move source extents to destination extents | 93 MOVE = 2; // Move source extents to destination extents |
(...skipping 25 matching lines...) Expand all Loading... |
119 // (At time of writing) usually 4096 | 119 // (At time of writing) usually 4096 |
120 optional uint32 block_size = 3 [default = 4096]; | 120 optional uint32 block_size = 3 [default = 4096]; |
121 | 121 |
122 // If signatures are present, the offset into the blobs, generally | 122 // If signatures are present, the offset into the blobs, generally |
123 // tacked onto the end of the file. We use an offset rather than | 123 // tacked onto the end of the file. We use an offset rather than |
124 // a bool to allow for more flexibility in future file formats. | 124 // a bool to allow for more flexibility in future file formats. |
125 // If this is absent, it means signatures aren't supported in this | 125 // If this is absent, it means signatures aren't supported in this |
126 // file. | 126 // file. |
127 optional uint64 signatures_offset = 4; | 127 optional uint64 signatures_offset = 4; |
128 } | 128 } |
OLD | NEW |