From c7c0c6fe54426c494d62654d0cabdfb7cd6d9a31 Mon Sep 17 00:00:00 2001 From: Peter Taoussanis Date: Wed, 30 Sep 2015 12:43:11 +0700 Subject: [PATCH] Stop documenting `:skip-header?` option It's almost entirely useless now, and dangerous: folks who absolutely know what they're doing can keep using it, but don't broadcast its existance. --- src/taoensso/nippy.clj | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/taoensso/nippy.clj b/src/taoensso/nippy.clj index 1991329..7f2ab32 100644 --- a/src/taoensso/nippy.clj +++ b/src/taoensso/nippy.clj @@ -400,10 +400,12 @@ "Serializes arg (any Clojure data type) to a byte array. To freeze custom types, extend the Clojure reader or see `extend-freeze`." (^bytes [x] (freeze x nil)) - (^bytes [x {:keys [compressor encryptor password skip-header?] + (^bytes [x {:keys [compressor encryptor password] :or {compressor :auto - encryptor aes128-encryptor}}] - (let [encryptor (when password encryptor) + encryptor aes128-encryptor} + :as opts}] + (let [skip-header? (:skip-header? opts) ; Want this *un*documented + encryptor (when password encryptor) zero-copy-mode? (and (nil? compressor) (nil? encryptor)) baos (ByteArrayOutputStream. 64) dos (DataOutputStream. baos)]