Hello all. I need a couple of base36 (https://en.wikipedia.org/wiki/Base_36) encoding/decoding functions with the following or similar signatures:
function Base36Encode(Buffer: TBytes): string; overload; function Base36Encode(const Buffer; BufSize: Integer): string; overload; function Base36Decode(const S: string): TBytes; My aim is to encode/decode GUIDs and other binary data in a manner that can be stored in a database CHAR (or VARCHAR) column with the least possible size but in such a way that value comparisons do not need to be case-sensitive. Thus far I've been using Base64 encoding for which I have found efficient routines, but base64 requires case-sensitive collation/comparisons and I would like to be able to avoid that. Anybody knows where I could find such functions or care to share some? So far the only ones I've found encode/decode only a single 32-bit integer or a base10 string representation of a number and I would want to be able to encode/decode a binary buffer of arbitrary size. Thank you in advance -- Constantine
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal