@Override
    protected void writeValue(final BigInteger value, final Buffer buffer, final GraphBinaryWriter context) throws IOException {
        final byte[] twosComplement = value.toByteArray();
        buffer.writeInt(twosComplement.length).writeBytes(twosComplement);
    }
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/binary/types/BigIntegerSerializer.java