--HG-- rename : lang/python/fpacking.py => lang/python/wiredtiger/fpacking.py rename : lang/python/intpack-test.py => lang/python/wiredtiger/intpack-test.py rename : lang/python/intpacking.py => lang/python/wiredtiger/intpacking.py rename : lang/python/packing-test.py => lang/python/wiredtiger/packing-test.py rename : lang/python/packing.py => lang/python/wiredtiger/packing.py
15 lines
341 B
Python
15 lines
341 B
Python
#!/usr/bin/env python
|
|
#
|
|
# Copyright (c) 2008-2013 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
|