encode_long(x)
Encode a long to a two's complement little-endian binary string. Note that 0L is a special case, returning an empty string, to save a byte in the LONG1 pickling context.
>>> encode_long(0L)
''
>>> encode_long(255L)
\xff\x00
>>> encode_long(32767L)
\xff\x7f
>>> encode_long(-256L)
\x00\xff
>>> encode_long(-32768L)
\x00\x80
>>> encode_long(-128L)
\x80
>>> encode_long(127L)
\x7f
>>>