Opened 12 years ago
Closed 12 years ago
#4890 closed Feature Requests (wontfix)
URL compatible base64 encoding/decoding (RFC 3548)
Reported by: | anonymous | Owned by: | Robert Ramey |
---|---|---|---|
Milestone: | To Be Determined | Component: | serialization |
Version: | Boost 1.43.0 | Severity: | Optimization |
Keywords: | archive iterator base64 encoding | Cc: |
Description
We use the boost archive library for serialization of binary data which will be part of an URL. We encode the binary stream using the iterators transform_width and base64_from_binary. Since the base64_from_binary iterator uses symbols which must not be used in URLs we’ve derived a base64URL_from_binary iterator (and its counterpart), which follows RFC 3548 chapter 4. The code is a copy of the original base64_from_binary.hpp and binary_from_base64.hpp which is modified to use the symbols '-' and '_' instead of '+' and '/' for the values 62 and 63.
Attachments (1)
Change History (2)
by , 12 years ago
Attachment: | iterators.zi_ added |
---|
comment:1 by , 12 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
I had a brief look at this and I don't think it's something that belongs in the serialization library. It's application seems just too narrow.
I also would have some other reservations:
As submitted it applies this "tweak" to the whole file rather than just the url's. So it's something that would be better implemented as a special data type. e.g.:
struct url { template<class Archive> void serialize(Archive &ar, const unsigned int version){ ... } };
Robert Ramey
zip containing base64URL iterators