allow compression threshold to be specified in the serializer constructor