     (.init ssl-context (.getKeyManagers keymanager) (.getTrustManagers trustmanager) nil)
     (SSLOptions. ssl-context ssl-cipher-suites)))
 
+(defn- ^ProtocolOptions$Compression select-compression
+  [compression]
+  (case compression
+    :snappy ProtocolOptions$Compression/SNAPPY
+    :lz4 ProtocolOptions$Compression/LZ4
+    ProtocolOptions$Compression/NONE))
+
 (defn ^Session connect
   "Connects to the Cassandra cluster. Use `build-cluster` to build a cluster."
   ([hosts]

      (.withReconnectionPolicy builder reconnection-policy))
    (when load-balancing-policy
      (.withLoadBalancingPolicy builder load-balancing-policy))
    (when ssl
      (.withSSL builder (build-ssl-options ssl)))
    (when ssl-options

           ssl
           ssl-options
           kerberos
           protocol-version
           compression]}]
  (when force-prepared-queries
    (alter-var-root (var hayt/*prepared-statement*)
                    (constantly true)))
