fileformat.proto 1.7 KB

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