mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-18 11:31:00 -05:00
Routines for %-encoding and %-decoding.
These make a good storage format for mostly-textual data in configuration, if it can't afford to reserve any character as a delimiter. Assuming very few characters need to be escaped, the space cost is lower than base64, and also you can read it by eye.
This commit is contained in:
7
misc.h
7
misc.h
@ -116,6 +116,13 @@ void base64_encode_fp(FILE *fp, ptrlen data, int cpl);
|
||||
strbuf *base64_encode_sb(ptrlen data, int cpl);
|
||||
bool base64_valid(ptrlen data);
|
||||
|
||||
void percent_encode_bs(BinarySink *bs, ptrlen data, const char *badchars);
|
||||
void percent_encode_fp(FILE *fp, ptrlen data, const char *badchars);
|
||||
strbuf *percent_encode_sb(ptrlen data, const char *badchars);
|
||||
void percent_decode_bs(BinarySink *bs, ptrlen data);
|
||||
void percent_decode_fp(FILE *fp, ptrlen data);
|
||||
strbuf *percent_decode_sb(ptrlen data);
|
||||
|
||||
struct bufchain_granule;
|
||||
struct bufchain_tag {
|
||||
struct bufchain_granule *head, *tail;
|
||||
|
Reference in New Issue
Block a user