     (.newDefaultBag (BagFactory/getInstance) vals)
     (.newDefaultBag (BagFactory/getInstance))))
 
+(defn ^:private pig-freeze [value]
+  (DataByteArray. (freeze value {:skip-header? true, :legacy-mode true})))
+
+(defn ^:private pig-freeze-with-nils [value]
+  (if value
+    (pig-freeze value)))
+
 ;; **********
 
 (defn byte->hex-digit


(defn freeze-vals [value]
  {:pre [(map? value)]}
  (reduce-kv (fn [m k v] (assoc m k (DataByteArray. (freeze v)))) {} value))

(defmulti thaw-anything
  "Attempts to thaw any child value. Returns it as '(freeze ...)"

    (catch Throwable z (throw (RuntimeException. z)))))

;; **********

(defn args->map
  "Returns a fn that converts a list of args into a map of named parameter
