Closed alolis closed 11 years ago
nippy prepends a type id (an int) to the byte array, so that it knows how to decode it, it would be impossible to "guess" the type otherwise. As a result thaw-from-bytes will only work with byte arrays created using freeze-to-bytes.
https://github.com/ptaoussanis/nippy/blob/master/src/taoensso/nippy.clj#L12 https://github.com/ptaoussanis/nippy/blob/master/src/taoensso/nippy.clj#L195
I see, makes sense. Thanks for the reply mpenet :)
Thanks Max!
Hello,
I wanted to ask if nippy is doing anything special when you
freeze-to-bytes
a string because I have noticed that if I do this:(thaw-from-bytes (.getBytes "my-string"))
then it simply won't work even though I expected for strings to work fine. I am curious, what is the reason for this?
Thank you for your time