File: base64.md

package info (click to toggle)
glib2.0 2.84.4-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 66,112 kB
  • sloc: ansic: 538,924; python: 9,661; sh: 1,612; xml: 1,482; perl: 1,222; cpp: 535; makefile: 321; javascript: 11
file content (20 lines) | stat: -rw-r--r-- 881 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Title: Base64 Encoding
SPDX-License-Identifier: LGPL-2.1-or-later
SPDX-FileCopyrightText: 2006, 2009 Matthias Clasen

# Base64 Encoding

Base64 is an encoding that allows a sequence of arbitrary bytes to be
encoded as a sequence of printable ASCII characters. For the definition
of Base64, see [RFC 1421](http://www.ietf.org/rfc/rfc1421.txt) or
[RFC 2045](http://www.ietf.org/rfc/rfc2045.txt).
Base64 is most commonly used as a MIME transfer encoding for email.

GLib supports incremental encoding using [func@GLib.base64_encode_step] and
[func@GLib.base64_encode_close]. Incremental decoding can be done with
[func@GLib.base64_decode_step]. To encode or decode data in one go, use
[func@GLib.base64_encode] or [func@GLib.base64_decode]. To avoid memory
allocation when decoding, you can use [func@GLib.base64_decode_inplace].

Support for Base64 encoding was added in GLib 2.12.