Files
mongo/lang/python/intpack-test.py
Michael Cahill 734f5a7974 Update copyright notices for the BDB stubs and the Python API tests.
--HG--
extra : rebase_source : c270e923e1df304e8190062413a5028ad3da78d4
2012-02-02 10:03:18 +11:00

16 lines
343 B
Python

#!/usr/bin/env python
#
# Copyright (c) 2008-2012 WiredTiger, Inc.
# All rights reserved.
#
# See the file LICENSE for redistribution information.
#
from intpacking import compress_int
i = 1
while i < 1 << 60:
print -i, ''.join('%02x' % ord(c) for c in compress_int(-i))
print i, ''.join('%02x' % ord(c) for c in compress_int(i))
i <<= 1