Closed da99 closed 6 years ago
Yes, I think so. I have no idea how to make a nice API using Slice(UInt8) for binary data.
No, this is wrong. Non-text data in a string is simply incorrect, and creating a String
from Bytes
causes a memory copy anyway. Encoding the binary data into a String
using base64 for example to be valid crystal code takes even more of a performance hit. Please provide an adequate API for binary data.
If I have binary data (eg MessagePack encoded data), shall I encode it to a string representation for Crystal-Redis?