Adds compression flag to toHex/toBin and tests