Amin Hassani | c3e6b53 | 2017-03-07 17:47:25 -0800 | [diff] [blame] | 1 | // Copyright 2017 The Chromium OS Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | syntax = "proto3"; |
| 6 | |
Amin Hassani | 7074da6 | 2017-09-30 17:14:06 -0700 | [diff] [blame] | 7 | package puffin.metadata; |
Amin Hassani | c3e6b53 | 2017-03-07 17:47:25 -0800 | [diff] [blame] | 8 | option optimize_for = LITE_RUNTIME; |
| 9 | |
Amin Hassani | 7074da6 | 2017-09-30 17:14:06 -0700 | [diff] [blame] | 10 | message BitExtent { |
Amin Hassani | c3e6b53 | 2017-03-07 17:47:25 -0800 | [diff] [blame] | 11 | uint64 offset = 1; |
| 12 | uint64 length = 2; |
| 13 | } |
| 14 | |
| 15 | message StreamInfo { |
Amin Hassani | 7074da6 | 2017-09-30 17:14:06 -0700 | [diff] [blame] | 16 | repeated BitExtent deflates = 1; |
| 17 | repeated BitExtent puffs = 2; |
Amin Hassani | c3e6b53 | 2017-03-07 17:47:25 -0800 | [diff] [blame] | 18 | uint64 puff_length = 3; |
| 19 | } |
| 20 | |
| 21 | message PatchHeader { |
Tianjie | 24d989f | 2021-07-23 16:10:55 -0700 | [diff] [blame] | 22 | enum PatchType { |
| 23 | BSDIFF = 0; |
| 24 | ZUCCHINI = 1; |
| 25 | } |
| 26 | |
Amin Hassani | c3e6b53 | 2017-03-07 17:47:25 -0800 | [diff] [blame] | 27 | int32 version = 1; |
| 28 | StreamInfo src = 2; |
| 29 | StreamInfo dst = 3; |
| 30 | // The bsdiff patch is installed right after this protobuf. |
Tianjie | 24d989f | 2021-07-23 16:10:55 -0700 | [diff] [blame] | 31 | |
| 32 | PatchType type = 4; |
Amin Hassani | c3e6b53 | 2017-03-07 17:47:25 -0800 | [diff] [blame] | 33 | } |