-*- mode: org -*-
Hard because we really want to decode groups at a time. But ascii85 screws that paradigm up with variable-sized groups.
Must SHRINK-VECTOR on NIL destination in case we encoded ‘z’.
This is probably really only doable for encoding to freshly-consed vectors. Certainly it’s much more doable for clients with the upcoming async interface.
The trick will be to do this without adding too much bloat. Will probably only do this for a NIL destination, as that’s the case where we have the most to win from inlining the writer closure.
Going to be hard because there’s not a standard interface for octet streams.
Trying to do minimal allocation; might have to just suck it up and admit that we are going to over-allocate fairly often.
Especially in the ascii85 case, over-allocation is just a fact of life.
We might just have to accept a bit of code bloat everyplace else, by duplicating logic/functions for simple vs. non-simple. I don’t want to restrict clients to always using simple arrays everywhere.
CCL looks like it ought to be able to get around this, but I can’t find the magic call.
We are definitely going to over-allocate if we permit whitespace.
Python’s binascii module has a few we might consider adding.