1 // Copyright 2014 The Chromium 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.
7 option optimize_for = LITE_RUNTIME;
11 // Everything below this comment was copied from the page
12 // <https://developers.google.com/safe-browsing/developers_guide_v3>,
13 // section "HTTP Response for Data" under "Response Body".
15 // Chunk data encoding format for the shavar-proto list format.
17 required int32 chunk_number = 1;
19 // The chunk type is either an add or sub chunk.
24 optional ChunkType chunk_type = 2 [default = ADD];
26 // Prefix type which currently is either 4B or 32B. The default is set
27 // to the prefix length, so it doesn't have to be set at all for most
33 optional PrefixType prefix_type = 3 [default = PREFIX_4B];
34 // Stores all SHA256 add or sub prefixes or full-length hashes. The number
35 // of hashes can be inferred from the length of the hashes string and the
37 optional bytes hashes = 4;
39 // Sub chunks also encode one add chunk number for every hash stored above.
40 repeated int32 add_numbers = 5 [packed = true];