HomeSoftware Heritage

Support serialization and deserialization of ints of arbitrary length

Description

Support serialization and deserialization of ints of arbitrary length

msgpack only has built-in support for ints that fit in 64 bits. However, we
happen to be storing arbitrary json in the archive, which itself has support for
integers of arbitrary length, which themselves are mapped to "long" integers in
Python, which make the msgpack encoder blow up.

Fortunately, overflowing integers are passed to the default object hook. We
generate a msgpack "extended type" with code 1 for arbitrary integers.

Details

Provenance
olasdAuthored on Apr 17 2020, 9:48 AM
olasdPushed on Apr 17 2020, 3:58 PM
Differential Revision
D3026: Support serialization and deserialization of ints of arbitrary length
Parents
rDCOREad8bf9c09f6b: Run Black on setup.py.
Branches
Unknown
Tags
Unknown
Build Status
Buildable 11870
Build 18005: test-and-buildJenkins console · Jenkins