Debian Codegraph @

src/ImportExport/fileformat.proto

raw
1 /** Copyright (c) 2010 Scott A. Crosby. <[email protected]>
2
3 This program is free software: you can redistribute it and/or modify
4 it under the terms of the GNU Lesser General Public License as
5 published by the Free Software Foundation, either version 3 of the
6 License, or (at your option) any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU Lesser General Public License for more details.
12
13 You should have received a copy of the GNU Lesser General Public License
14 along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 */
17
18 syntax = "proto2";
19
20 option optimize_for = LITE_RUNTIME;
21 option java_package = "crosby.binary";
22 package OSMPBF;
23
24 //protoc --java_out=../.. fileformat.proto
25
26
27 //
28 // STORAGE LAYER: Storing primitives.
29 //
30
31 message Blob {
32 optional bytes raw = 1; // No compression
33 optional int32 raw_size = 2; // When compressed, the uncompressed size
34
35 // Possible compressed versions of the data.
36 optional bytes zlib_data = 3;
37
38 // PROPOSED feature for LZMA compressed data. SUPPORT IS NOT REQUIRED.
39 optional bytes lzma_data = 4;
40
41 // Formerly used for bzip2 compressed data. Depreciated in 2010.
42 optional bytes OBSOLETE_bzip2_data = 5 [deprecated=true]; // Don't reuse this tag number.
43 }
44
45 /* A file contains an sequence of fileblock headers, each prefixed by
46 their length in network byte order, followed by a data block
47 containing the actual data. types staring with a "_" are reserved.
48 */
49
50 message BlobHeader {
51 required string type = 1;
52 optional bytes indexdata = 2;
53 required int32 datasize = 3;
54 }
55
56