Merge pull request #65 from simon04/oneof

fileformat.proto: use oneof for blob data
This commit is contained in:
Jochen Topf 2021-01-05 10:24:41 +01:00 committed by GitHub
commit 6d42449842
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 11 deletions

View File

@ -33,23 +33,26 @@ package OSMPBF;
// //
message Blob { message Blob {
optional bytes raw = 1; // No compression
optional int32 raw_size = 2; // When compressed, the uncompressed size optional int32 raw_size = 2; // When compressed, the uncompressed size
// Possible compressed versions of the data. oneof data {
optional bytes zlib_data = 3; bytes raw = 1; // No compression
// For LZMA compressed data (optional) // Possible compressed versions of the data.
optional bytes lzma_data = 4; bytes zlib_data = 3;
// Formerly used for bzip2 compressed data. Deprecated in 2010. // For LZMA compressed data (optional)
optional bytes OBSOLETE_bzip2_data = 5 [deprecated=true]; // Don't reuse this tag number. bytes lzma_data = 4;
// For LZ4 compressed data (optional) // Formerly used for bzip2 compressed data. Deprecated in 2010.
optional bytes lz4_data = 6; bytes OBSOLETE_bzip2_data = 5 [deprecated=true]; // Don't reuse this tag number.
// For ZSTD compressed data (optional) // For LZ4 compressed data (optional)
optional bytes zstd_data = 7; bytes lz4_data = 6;
// For ZSTD compressed data (optional)
bytes zstd_data = 7;
}
} }
/* A file contains an sequence of fileblock headers, each prefixed by /* A file contains an sequence of fileblock headers, each prefixed by