Add a version field for compression type.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
This commit is contained in:
parent
24f1e7728b
commit
faa606e6e9
1 changed files with 6 additions and 0 deletions
|
|
@ -24,6 +24,12 @@ class DatabaseVersion(int):
|
|||
def version_version(self):
|
||||
"""The version for the meaning of the bits in this integer."""
|
||||
return (int(self) & 0xff000000) >> 24
|
||||
def compression_version(self):
|
||||
"""The value indicating the format in which the data is compressed."""
|
||||
return (int(self) & 0xff0000) >> 16
|
||||
def compression(self):
|
||||
"""A string indicating the format in which the data is compressed."""
|
||||
return ("none", "xz")[self.compression_version()]
|
||||
def serialization_version(self):
|
||||
"""The value indicating the format in which the data is serialized."""
|
||||
return (int(self) & 0xff00) >> 8
|
||||
|
|
|
|||
Loading…
Reference in a new issue