xref: /aosp_15_r20/external/puffin/src/puffin.proto (revision 07fb1d065b7cfb4729786fadd42a612532d2f466)
1*07fb1d06SElliott Hughes// Copyright 2017 The ChromiumOS Authors
2*07fb1d06SElliott Hughes// Use of this source code is governed by a BSD-style license that can be
3*07fb1d06SElliott Hughes// found in the LICENSE file.
4*07fb1d06SElliott Hughes
5*07fb1d06SElliott Hughessyntax = "proto3";
6*07fb1d06SElliott Hughes
7*07fb1d06SElliott Hughespackage puffin.metadata;
8*07fb1d06SElliott Hughesoption optimize_for = LITE_RUNTIME;
9*07fb1d06SElliott Hughes
10*07fb1d06SElliott Hughesmessage BitExtent {
11*07fb1d06SElliott Hughes  uint64 offset = 1;
12*07fb1d06SElliott Hughes  uint64 length = 2;
13*07fb1d06SElliott Hughes}
14*07fb1d06SElliott Hughes
15*07fb1d06SElliott Hughesmessage StreamInfo {
16*07fb1d06SElliott Hughes  repeated BitExtent deflates = 1;
17*07fb1d06SElliott Hughes  repeated BitExtent puffs = 2;
18*07fb1d06SElliott Hughes  uint64 puff_length = 3;
19*07fb1d06SElliott Hughes}
20*07fb1d06SElliott Hughes
21*07fb1d06SElliott Hughesmessage PatchHeader {
22*07fb1d06SElliott Hughes  enum PatchType {
23*07fb1d06SElliott Hughes    BSDIFF = 0;
24*07fb1d06SElliott Hughes    ZUCCHINI = 1;
25*07fb1d06SElliott Hughes  }
26*07fb1d06SElliott Hughes
27*07fb1d06SElliott Hughes  int32 version = 1;
28*07fb1d06SElliott Hughes  StreamInfo src = 2;
29*07fb1d06SElliott Hughes  StreamInfo dst = 3;
30*07fb1d06SElliott Hughes  // The bsdiff patch is installed right after this protobuf.
31*07fb1d06SElliott Hughes
32*07fb1d06SElliott Hughes  PatchType type = 4;
33*07fb1d06SElliott Hughes}