public static Compressor.Compression encode_and_compress(Slime slime, Compressor compressor) {
        return new BinaryEncoder().encode(slime).compress(compressor);
    }
Take a Slime object and serialize it into binary format, and compresses it.
@param slime the object which is to be serialized.
@param  compressor the compressor to use.
@return a new byte array with just the encoded and compressed slime.
vespajlib/src/main/java/com/yahoo/slime/BinaryFormat.java